Forum Discussion

justlooking's avatar
justlooking
New Contributor
12 years ago

help inserting datasource variable into xml string

trying to drive data in a manner similar to this, but don't know how to insert variable into a string.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sat="http://tempuri.org/SatuitWebService/SatuitCRM_XML_API">
<soapenv:Header/>
<soapenv:Body>
<sat:AddActivity>
<!--Optional:-->
<sat:strUID>fletch</sat:strUID>
<!--Optional:-->
<sat:strPWD>jackass12</sat:strPWD>
<!--Optional:-->
<sat:xmlData><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<tables>
<ptickler>
<row>
<icomkey>-1</icomkey>
<ibuskey>395</ibuskey>
<dcomment>${ActivitySource#dcomment}</dcomment>
<cactivity>Appointment</cactivity>
<cnoteudf3>New activity rah</cnoteudf3>
<cphase />
<cbphswitch />
</row>
</ptickler>
</tables>
]]></sat:xmlData>
</sat:AddActivity>
</soapenv:Body>
</soapenv:Envelope>
  • some additional clarification -

    there are 3 parameters to the web method: username, password, and XML, which is the data to pass to the method.

    I'd like to have the XML defined statically to the test, with parameters in the XML string which will be populated at run time by a data step. If the entire XML message is wrapped in a CDATA wrapper and saved to a file, I can pull the entire message and populate a property inserted into the CDATA string, but this doesn't work if the CDATA wrapper and XML are part of the test case.