randomnet
12 years agoNew Contributor
Groovy script caches request.submit()
I have a groovy script for a mockservice which checks a request attribute and decides whether to respond with a mockResponse or forward the request to the server (from the soapUI MockService as proxy tutorial).
It works, but I see that the responses from the server are cached and I need to wait for sometime before I actually get anything to the server.
and the mock response "ServerResponse" is
How do I avoid request.submit(...) caching?
It works, but I see that the responses from the server are cached and I need to wait for sometime before I actually get anything to the server.
}else {
// Server response
def project = mockOperation.mockService.project
def request = project.interfaces["DeviceServiceBinding"].operations["update"].getRequestByName("Request 1")
request.requestContent = mockRequest.requestContent
request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
requestContext.responseMessage = request.responseContentAsXml
return "ServerResponse"
}
and the mock response "ServerResponse" is
${responseMessage}How do I avoid request.submit(...) caching?