Forum Discussion
- MarcusJModeratorHi,
Please clarify what you are trying to use by Groovy script.
Below is a link on SoapUI and groovy scripts:
http://www.soapui.org/Scripting-Propert ... brary.html
Regards,
Marcus
Smartbear Support - For Groovy, you can also have an option of using JsonSlurper library to parse Json content.
This article has a good example: http://www.robert-nemet.com/2012/08/jso ... oapui.html
Thanks,
Michael Giller
SmartBear Software - itaykaldiContributor
mrJames wrote: Hi,
Please clarify what you are trying to use by Groovy script.
Below is a link on SoapUI and groovy scripts:
http://www.soapui.org/Scripting-Propert ... brary.html
Regards,
Marcus
Smartbear Support
I receive JSON witch SoapUI cannot Parse to XML ( see my old post http://forum.soapui.org/viewtopic.php?f=2&t=21386&sid=10abdb8983bc881954b4d2aea06c2aea)
i want to clean the JSON and move it to Mock Resposne for assertion
but Mock Response doesn't parse JSON to XML, so i want to convert JSON to XML and then pass it to Mock Resposne (i know its work around) - MarcusJModeratorHi,
Are you using valid JSON (the link to the post showed you using invalid json)?
If so then the JsonSlurper mentioned in the previous post should help.
You also mentioned you know a workaround to your issue, this post can be marked as "resolved" if
your happy with your workaround. - Hi,
If you are trying to return JSON in a mock service within SoapUI Pro, then you would need to implement one of the following ways in mocking up a REST web service: http://www.soapui.org/Service-Mocking/m ... vices.html
If you are trying to use a Mock Response Test Step (http://www.soapui.org/SOAP-and-WSDL/tes ... vices.html), then this step would only work with a SOAP call.
Thanks,
Michael Giller
SmartBear Software