You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

How to Pass XML String in SOAPDoc Parm

No replies
Guest's picture

I am consuming a web service from a third party. One of the parameters in the SOAP Doc is an XML formatted as a string.

Let's say I have an XMLDoc with the following data:

Local string &strXML = "<?xml version=""1.0""?> John Doe 123456 ";

Local SoapDoc &SOAPDoc;
&SOAPDoc.AddParm("strUsersInXML", &strXML);

&SOAPXMLDoc = CreateXMLDoc();
&SOAPXMLDoc = &SOAPDoc.XmlDoc;

&request = CreateMessage(Operation.NEWUSER);

In the &request, the tags in my XML string are changed to < and > So when I call the service, it is unable to interpret the strUsersInXML parameter.

How do I code this so that the tags in my XML string are kept as they are?