print("------------------------- START FLOW --------------------------------------");
SequenceFlow_12zyz2n
print("------- Task_Print -------");
param1=55;
print("====-=-=-=-===== new param1=" + param1);
execution.setVariable("param1", param1);
SequenceFlow_1sen3i4
SequenceFlow_1jqwaj0
print("===== param1=" + param1);
param1=45;
print("===== new param1=" + param1);
http://192.168.24.18:8086/WS/calc
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:myws="http://myws/">
<soapenv:Header/>
<soapenv:Body>
<myws:fixedlist>
<arg0>${arg0}</arg0>
<arg1>${arg1}</arg1>
</myws:fixedlist>
</soapenv:Body>
</soapenv:Envelope>
text/xml;charset=UTF-8
${S(response)}
${headers}
${statusCode}
${S(response)
.childElement("Body")
.childElement("http://myws/", "fixedlistResponse")
.textContent()}
soap-http-connector
print("SOAPHeaders=" + SOAPHeaders);
print("SOAPStatusCode=" + SOAPStatusCode);
print("SOAPResponse=" + SOAPResponse);
SequenceFlow_1jqwaj0
SequenceFlow_0ehq33i
execution.setVariable("param1", "22");
/*
execution.setVariable("arg0", "12");
execution.setVariable("arg1", "4");
*/
SequenceFlow_1sen3i4
SequenceFlow_0ehq33i
SequenceFlow_12zyz2n
/*
parsedStr="<answer>
<arguments><arg0>33</arg0><arg1>4</arg1></arguments>
<results>
<result id="1"><method>add</method><amount>37.0</amount></result>
<result id="2"><method>div</method><amount>8.0</amount></result>
<result id="33"><method>mult</method><amount>132.0</amount></result>
<result id="44"><method>minus</method><amount>29.0</amount></result>
</results>
<ServiceResult><ResultCode>0</ResultCode><ResultText>Ok</ResultText></ServiceResult></answer>";
*/
print('parsedStr =' + parsedStr);
var arg0=S(parsedStr).xPath('string(/answer/arguments/arg0)').string();
print('arg0=' + arg0);
var arg1=S(parsedStr).xPath('string(/answer/arguments/arg1)').string();
print('arg1=' + arg1);
var method1=S(parsedStr).xPath('string(/answer/results/result[1]/method)').string();
print('method1 = ' + method1);
var result_id_33 = S(parsedStr).xPath("string(/answer/results/result[3]/@id)").string();
print("result_id_33 = " + result_id_33 );
var count=S(parsedStr).childElement("results").childElements("result").size();
print('count=' + count);
print("--------------------------===--------------------------------" );
var i;
for (i=0; i<count; i++)
{
var n=i+1;
var param1="string(/answer/results/result[" +n+ "]/@id)";
var param2="string(/answer/results/result[" +n+ "]/method)";
var param3="string(/answer/results/result[" +n+ "]/amount)";
print("n=" + n + " result id=" + S(parsedStr).xPath(param1).string() + " method=" + S(parsedStr).xPath(param2).string() + " amount=" + S(parsedStr).xPath(param3).string() );
}
var ResultCode = S(parsedStr).xPath("string(/answer/ServiceResult/ResultCode)").string();
print("ResultCode = " + ResultCode );
var ResultText = S(parsedStr).xPath("string(/answer/ServiceResult/ResultText)").string();
print("ResultText= " + ResultText);