SaraCavelind
12 years agoContributor
MockResponse dispatch script fails...
Hi!
I'm writing a dispatch script in my mocked services to among other things call a request. The code I use is this:
def project = mockOperation.mockService.project
def request = project.interfaces["${BindingName}"].operations["${operationName}"].getRequestByName("${requestName}")
// set request from incoming
request.requestContent = mockRequest.requestContent
It appears as if the request object isn't set (I get a nullpointer when submitting further down)
request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
// save response to context
requestContext.responseMessage = request.responseContentAsXml
What am I doing wrong??
I'm writing a dispatch script in my mocked services to among other things call a request. The code I use is this:
def project = mockOperation.mockService.project
def request = project.interfaces["${BindingName}"].operations["${operationName}"].getRequestByName("${requestName}")
// set request from incoming
request.requestContent = mockRequest.requestContent
It appears as if the request object isn't set (I get a nullpointer when submitting further down)
request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
// save response to context
requestContext.responseMessage = request.responseContentAsXml
What am I doing wrong??