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
Guest

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 jdoe@email.com ";

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

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

&request = CreateMessage(Operation.NEWUSER);
&request.setXmlDoc(&SOAPXMLDoc);

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?

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
5 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.