Forum Discussion

radg2's avatar
radg2
Visitor
3 years ago

Request is not available in MockService for script

I have prepared REST Mock Service. It contains PATH method request handling which has set "Script" as Dispatch.

The foollowing script is set:

import groovy.json.JsonSlurper
def jsonInputString = mockRequest.getRequestContent()
def cnt = new JsonSlurper().parseText(jsonInputString)
log.info "test: " + cnt

 

If the PATCH request is sent to the REST MockService, I get "

  • Wed Apr 27 14:14:30 CEST 2022:ERROR:An error occurred [com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; java.lang.IllegalArgumentException: Text must not be null or empty], see error log for details

 

I have noticed that it works for POST method

What can I get request in the script ?

"

No RepliesBe the first to reply