Last post Nov 15, 2011 09:09 PM by Decker Dong - MSFT
Nov 13, 2011 09:21 PM|dliving1518|LINK
I have a need to interface with another vendor system. Normally not a problem with wewb services, however, this vendor is convinced that wb services have to exchange everything as a string with the XML response embedded in a string...serialization.
THey wen as far as to send me sample code to "prove" the point.
public void Submit(string document)
// convert the string into an XML document.
// at this point, the string has been converted to an XML document and the schema has been validated, and DOM manipulation/reading can occur.
// using the xmlDocument created above, extract the warrant details.
var Warrent = ParseDataFromXmlDocument(xmlDocument);
I've built about 50 web services for other clients, but to no avail with this group. I end up with an extra step to build my response inside a string and then send the string up...akk this is SOAP
My simple question is this function XDocument.Parse creates an XML document from a string...Is there not a similar function that will read an SOAP envelope and extract the payload?
Nov 15, 2011 09:09 PM|Decker Dong - MSFT|LINK
Is there not a similar function that will read an SOAP envelope and extract the payload?
I'm afraid not (Only as far as I see……). You should load the whole string as xml contents first, and then use the .NET class to deal with that.
Another way maybe you can use：
XmlDocument x = new XmlDocument();