cancel
Showing results for 
Search instead for 
Did you mean: 

Grabbing a response from SOAPUI Pro

Highlighted
Contributor

Grabbing a response from SOAPUI Pro

Let's say for example, you send a SOAP request to create a record in a database and the server responds that the record has been created by returning the key of the record. You want to use that key in a different SOAP request.

Is there a way to grab the soap response line/data item (in a Groovy script or some other way)?

It does not matter if I have to parse the data, if needed.

Help!!

Thanks!
Jim
1 REPLY 1
Super Contributor

Re: Grabbing a response from SOAPUI Pro

Hi Jim,

sure.. you can use a PropertyTransfer Step in your TestCase to extract the key from the response message and then use that in another request or store it in a property, DataSink, etc..

Have a look at http://www.soapui.org/userguide/functio ... sfers.html to get you started..

Alternatively you can create a Groovy Script that extracts the value and does something with it; have a look at the GroovyUtils/XmlHolder classes described at http://www.soapui.org/userguide/functio ... roovyUtils to get going..

regards,

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2
Top Kudoed Authors