Media01
13 years agoNew Contributor
[Res] Capture a Response from Groovy script to be used later
I am working on a Groovy Script that uses OAUTH for authentication to hit a web-service posting a json payload and then returns a response as a string. I am wondering how to capture the individual at...
- 13 years agoHi,
If you want to expose this response for property-transfers, etc - you will need to convert it to XML and return it from the script teststep itself (exposed as the Script Result property). Have a look at how soapUI does this conversion at http://www.soapui.org/xref/com/eviware/ ... ndler.html, lines 48 to 55, you can basically do corresponding calls in groovy and then just end the script with a return statement that returns the generated XML, which should then show up in other places in soapUI where you specify a response property (for example property transfers, assertions, etc)
Does that help?
regards,
/Ole
SmartBear Software