Samaadan Super Contributor.
Super Contributor.
303 views

Pass an XML tag as a variable value to the Invoke Method 2

Got a need to pass the XML tag as input to Invoke Method 2, The XML tags "<" and ">" are getting converted into &lt; and &gt; which the webservice is not able to handle. Looking for some suggestions on how i can approch this. 

 

#########################################################

XML Template:

#########################################################

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://configuration.api.sitescope.mercury.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

   <soapenv:Header/>

   <soapenv:Body>

      <con:disableAssociatedAlerts soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <in0 xsi:type="con:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]">?</in0>

         <in1 xsi:type="xsd:string">?</in1>

         <in2 xsi:type="xsd:string">?</in2>

         <in3 xsi:type="xsd:string">?</in3>

         <in4 xsi:type="xsd:string">?</in4>

         <in5 xsi:type="xsd:string">?</in5>

         <in6 xsi:type="xsd:string">?</in6>

      </con:disableAssociatedAlerts>

   </soapenv:Body>

</soapenv:Envelope>

#########################################################

 

#########################################################

inputMap

#########################################################

disableAssociatedAlerts|in0=disableAssociatedAlerts.in0

disableAssociatedAlerts|in1=disableAssociatedAlerts.in1

disableAssociatedAlerts|in2=disableAssociatedAlerts.in2

disableAssociatedAlerts|in3=disableAssociatedAlerts.in3

disableAssociatedAlerts|in4=disableAssociatedAlerts.in4

disableAssociatedAlerts|in5=disableAssociatedAlerts.in5

disableAssociatedAlerts|in6=disableAssociatedAlerts.in6

#########################################################

 

#########################################################

Format in which the Webservcie is expecting the data

#########################################################

         <in0 xsi:type="con:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]">

                                <item xsi:type="xsd:string">Value 1</item>

                                <item xsi:type="xsd:string">Value 2</item>

         </in0>

         <in1 xsi:type="xsd:string">0</in1>

         <in2 xsi:type="xsd:string">1</in2>

         <in3 xsi:type="xsd:string">This is a test</in3>

         <in4 xsi:type="xsd:string">userid</in4>

         <in5 xsi:type="xsd:string">password</in5>

         <in6 xsi:type="xsd:string">Id</in6>

#########################################################

The array value is the folder path, so the number of items could vary from one webservice request to an another, modifying the input map dosent seem to be an option.

 

Tried to do with the HTTP Client Post Raw, but seem to fail, not sure how i can see the actual request that OO is sending to the webservice, The HTTP Client Post Raw dosent have the "returnXMLRequest" variable. Any suggestion would be helpful.

Labels (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.