Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlNode/XmlElement as an Input Parameter #955

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

bfcrmimick
Copy link
Contributor

I have recently experienced the Null value described in the issue #908 and decided to see if I could follow the suggested changes. In this pull request, I have added the suggested fix from @andersjonsson and then I also added a few Unit Tests for it.

In the integration tests, we have an XmlElement return type only and then a second test with both an XmlElement input and an XmlElement return time.

I have also added a new folder called XmlNodeInputOutputTests for the purpose of testing the XmlElement functions as a SOAP function vs a ChannelFactory object. I found the code is not quite happy with an XmlNode return type (the Test Server returns a message stating that it didn't get enough to consider a valid response).

Thank you,

Raymond Mimick

Following the issue details from DigDes#908, implemented an XmlDocument parse of the input parameter.
New Test Cases to check for XmlElement return type in both integration testing and as an XML SOAP message. Also, added an XmlElement input parameter to allow the code to accept a free-form Xml Document/Element
";
using (var host = CreateTestHost())
using (var client = host.CreateClient())
using (var content = new StringContent(body, Encoding.UTF8, "text/xml"))

Check warning

Code scanning / CodeQL

Information exposure through transmitted data Medium

This data transmitted to the user depends on
sensitive information
.
The test was failing due to Windows vs Linux New Line sequence.  Updated the sequence
@bfcrmimick
Copy link
Contributor Author

Apologies for the failing test case - it was a matter of Windows vs Linux in running the test when replacing new line characters. Updated to use Environment.NewLine instead.

@andersjonsson
Copy link
Collaborator

Looks good. Is there anything else you would like to add before merging? I think it's acceptable if it doesn't work with an XmlNode return type, since it's not a regression.

@bfcrmimick
Copy link
Contributor Author

bfcrmimick commented Aug 16, 2023 via email

@andersjonsson andersjonsson merged commit 18d041a into DigDes:develop Aug 17, 2023
3 checks passed
@andersjonsson
Copy link
Collaborator

Thank you for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants