Creating soap request in Groovy script
- 9 years ago
Hi,
It sounds like you might be trying to mock up a kind of async calback type scenario?
If so, one way to trigger the request via your mock is to invoke a TestCase which makes the Request - for an example please see:
Of course you can also programatically make the SOAP call from your mock, heres an example of making a SOAP request programtically:
Or something similar is shown here for programatically creating a REST call:
community.smartbear.com/t5/SoapUI-Open-Source/How-to-create-REST-project-using-Groovy-script/m-p/99305#M17568
One advantage of the first approach (triggering a TestCase) is that the Mock can dispatch its response before the callback SOAP request is made.
Hope this helps give you some ideas,
Rupert
- 9 years ago
Hi Abdelwahab,
If this is your first task with SoapUI, then I would say your homework is going well, its seems you have picked things up quickly! :-)
If you do get my book, I would love to hear how you found it, any good and bad points, could help me to improve.
Yes, a kind of routing - the basis of our discussion here is from a recipe in the book, the topic is how to test & mock a SOAP async callbacks. The replyTo is in reference to the WS-Addressing standard, and its value is taken from the request like you say.
In the recipe, there is a SoapUI situation someting like:
1. Client TestRequest to mock (passing ReplyTo and messageId)
2. Mock responds with acknowledgement.
3. Mock triggers callBack to address in ReplyTo (after some delay)
4. SOAP Mock Response TestStep recieves callback and runs Assertions
Best Regards,
Rup