Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use particular value from SOAP UI response into a new SOAP UI request

Tags:

soapui

From a SOAP UI response below;

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"         xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns0:HelpDesk_Submit_ServiceResponse xmlns:ns0="urn:HPD_IncidentInterface_Create_WS">
     <ns0:Incident_Number>**INC000000000274**</ns0:Incident_Number>
  </ns0:HelpDesk_Submit_ServiceResponse>
</soapenv:Body>
</soapenv:Envelope>

I want to take out INC000000000274 and then feed it into a specific place in a new SOAP UI request as below;

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:HPD_IncidentInterface_WS">
<soapenv:Header>
  <urn:AuthenticationInfo>
     <urn:userName></urn:userName>
     <urn:password></urn:password>
     <!--Optional:-->
     <urn:authentication></urn:authentication>
     <!--Optional:-->
     <urn:locale></urn:locale>
     <!--Optional:-->
     <urn:timeZone></urn:timeZone>
  </urn:AuthenticationInfo>
</soapenv:Header>
<soapenv:Body>
  <urn:HelpDesk_Query_Service>
     <urn:Incident_Number>**INC000000000274**</urn:Incident_Number>
  </urn:HelpDesk_Query_Service>

How can I do it? I am using SOAP UI free version. The value I want to take out and then feed in would be different everytime from the response.

like image 511
Sohaib Avatar asked Jun 05 '13 13:06

Sohaib


1 Answers

You need to set up a Property Transfer step to store the Incident Number into a Property, you can then use that Property in your request.

This soapUI tutorial covers a situation identical to the one you describe:

http://www.soapui.org/Functional-Testing/transferring-property-values.html

like image 126
Matt Hansen Avatar answered Jan 01 '23 09:01

Matt Hansen