Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SoapUI - How to use Property Transfer with POST request

Tags:

json

post

soapui

I am starting to evaluate SoapUI as my test suite, but the Property Transfer thing is really holding me back. I've read a lot of articles about it, but I could not find a way to make it work in my case.

My source is a POST request. This POST request returns me a JSON. I need to pass one of the values of this JSON to the next test.

My response is this:

<Response xmlns="https://localhost/authorize">
    <access_token>4a00c67e</access_token>
   <refresh_token></refresh_token>
   <scope>auth</scope>
   <token_type>online</token_type>
</Response>

I need to get the <access_token> and pass it to the next test as a parameter.

What should I write in the SOURCE and TARGET boxes to get this to work? Why is it so complicated and why there is no easy to understand tutorial about this? :(

like image 319
Daniel Avatar asked Dec 26 '22 12:12

Daniel


1 Answers

To add to what Abhishek said. If you only need the access_token you would use the following XPath:

declare namespace var="https://localhost/authorize";
//var:Response/var:access_token
like image 161
binaryNomad Avatar answered Jan 11 '23 07:01

binaryNomad