EDN Admin
Well-known member
We have an issue in that we need to deserialize an Xml response to a .NET WebMethod.
the issue is slightly more complicated in that we have an object generated by imported the WSDL in the standard way, but were not using that to call to WebMethod. What were doing is calling the GET version of the Method which returns Xml that is
slightly different to that of the SOAP body.
We have a deserialization helper, which will perform the deserialization correctly, providing the Xml is formatted correctly.
Weve examined the Xml, the difference appears to be that the GET method applies the XMLNS attribute (along with some others) to the root element, whereas using SOAP, it returns it on each element INSTEAD.
So the question, is there a way to transpose this in C# Code? Ive got the Xml as a string, and Ive read it into an XmlDocument and I cant find any easy way to do it.
Thank you in advance for any help you can give.
Martin
View the full article
the issue is slightly more complicated in that we have an object generated by imported the WSDL in the standard way, but were not using that to call to WebMethod. What were doing is calling the GET version of the Method which returns Xml that is
slightly different to that of the SOAP body.
We have a deserialization helper, which will perform the deserialization correctly, providing the Xml is formatted correctly.
Weve examined the Xml, the difference appears to be that the GET method applies the XMLNS attribute (along with some others) to the root element, whereas using SOAP, it returns it on each element INSTEAD.
So the question, is there a way to transpose this in C# Code? Ive got the Xml as a string, and Ive read it into an XmlDocument and I cant find any easy way to do it.
Thank you in advance for any help you can give.
Martin
View the full article