How to call SoapUI's request inside TestComplete scripts and retreive data from the WS' response?
Hi all,
I know how to define a ReadyAPI! or SoapUI test in TestComplete (TC), then to run it with a set of entry parameters and to retreive its execution log.
Now, I would like to run SoapUI's request calls inside TestComplete scripts. For instance:
function checkMsg(a_pane, a_text)
{
// press a button
pressOpen(a_pane);
// run web service
// < execute SoapUI request >
// check field value
return checkMessageText(a_text, a_pane, 'message');
}
Moreover, I would like to extract some fields value from the web service (WS) response. For instance, if the following WS' response, fields contractNumber and sessionId may interest me in the including TC script:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:actionResponse xmlns:ns2="http://ws.ctd.com/service">
<return>
<contractNumber>0100069362</contractNumber>
<sessionId>deab752d-0734-429c-9ea7-6e3e52ae982a</sessionId>
</return>
</ns2:actionResponse>
</soap:Body>
</soap:Envelope>
Many thanks in advance,
JP