PeopleSoft tools provides complete exposure to technical PeopleSoft tools and tips to help with PeopleSoft configuration and techniques – providing knowledge base answers.
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""?><users><user> <FName>John</FName> <LName>Doe</LName> <LoginID>123456</LoginID> <Email>jdoe@email.com</Email></user></users>";
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?
Peoplesoft Tools
150 members
Description
PeopleSoft tools provides complete exposure to technical PeopleSoft tools and tips to help with PeopleSoft configuration and techniques – providing knowledge base answers.
How to Pass XML String in SOAPDoc Parm
by CAC
May 17, 2017
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""?><users><user> <FName>John</FName> <LName>Doe</LName> <LoginID>123456</LoginID> <Email>jdoe@email.com</Email> </user></users>";
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?