Click to See Complete Forum and Search --> : SOAP envelope body w/xml data (unwanted ><)...


gcetti
June 5th, 2009, 03:14 PM
Hello,

I'm have a console app I developed in C# that is having problems with a SOAP envelope where I need the body to contain a string with XML data like:

<SOAPBody>
<XMLHeader>
<Element1>1</Element1>
</XMLHeader>
</SOAPBody>

Problem is - when the soap body is built from the api call, the actual envelope looks like this:
<SOAPBody
&lt;XMLHeader&lt;
&lt;Element1&gt;1&lt;/Element1&gt;
&lt;/XMLHeader&gt;
</SOAPBody>

I am supplied with the WSDL from another vendor, and adding the web reference it creates the object I need, with the api call. When I set the string object to the xml data, it is fine when I look at in the debugger, but when I view the SOAP traffic, the escape sequences are added. How can I prevent this from happening and have the body just remain straight text?

Thanks for any help,
Greg
greg@ram-software.com