Forum Discussion

AbdelwahabSadek's avatar
AbdelwahabSadek
Occasional Contributor
10 years ago
Solved

Creating soap request in Groovy script

Hi,

 

I have the following scenario that I am trying to replicate in Soap UI:

 

1-Client initate request.

2-Service resposes with an empty soap message

3-Service invokes another request based on a custom header in the initial request.

 

So i figured I need to set my Mock service dispatcher to a groovy script. now is there a way to invoke a request from the Groovy script?

 

// create XmlHolder for request content
def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent )
// get arguments
def replyto = holder["//replyto"]
log.info("Reply to: "+replyto);
// create a rerquest for the reply to header

????

return "EmptySoapMessage"