Ask a Question

Transfer part of the response

SOLVED
shevez
New Contributor

Transfer part of the response

Hi All,

 

I'm new in SoapUI webservices testing and I have problem with data transferring between Response and Request.
I would like to use “session id” and “authToken id” from Response in first TestStep in the Reqest in another Test Step.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns1:session id="DF83950B" xmlns:ns1="http://xml.x.com/ws"/>
<ns1:authToken id="8wFC1T0U" xmlns:ns1="http://xml.x.com/ws"/>
</soapenv:Header>
<soapenv:Body>
<ns1:loginReturn xmlns:ns1="http://xml.x.com/ws/login">OK.</ns1:loginReturn>
</soapenv:Body>
</soapenv:Envelope>

 

Thanks in advance for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
nmrao
Community Hero

Re: Transfer part of the response

To get the attribute use @ in xpath.

for example
//ns1:session/@id


Regards,
Rao.

View solution in original post

4 REPLIES 4
nmrao
Community Hero

Re: Transfer part of the response

You can achieve this in multiple ways.
1. Property transfer
2. Groovy script.

Please check the documentation.

Another example here
http://sqa.stackexchange.com/questions/17831/property-transfer-in-soap-ui-using-xpath/20213#20213


Regards,
Rao.
shevez
New Contributor

Re: Transfer part of the response

Thank you, I know that.

But I've got problem with names of atributes:

- sesion id

- authToken id

If there will be sesionid and authTokenid it will be easier, I think.

I want to use Property transfer, but I don't know how to define proper xpath.

 

nmrao
Community Hero

Re: Transfer part of the response

To get the attribute use @ in xpath.

for example
//ns1:session/@id


Regards,
Rao.

View solution in original post

shevez
New Contributor

Re: Transfer part of the response

Thank you very much.

This is what I needed 🙂

cancel
Showing results for 
Search instead for 
Did you mean: