Forum Discussion

gcilia's avatar
gcilia
New Contributor
9 years ago

Dispatch Style Script doesn't work

Hi Guys,

 

I have a problem with Dispatch Style Strategy Script in Ready! API.

 

I have inserted this code in Script form:

 

def requestBody = mockRequest.getRequestContent()
log.info "Request body: " + requestBody

if( requestBody.contains("getLineData") )
{
return "getLineData"
}
if( requestBody.contains("rechargeConfig") )
{
return "rechargeConfig"
}

 

and in Default Response: getLineData

 

After start of mockServer, when I send my Request on mock endpoint I get only the Default Response (getLineData) for each Request!

This happen with Ready! API and not with SoapUI.

 

Thanks

GC

 

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Can you please show different xml mockrequest and expected response.
    I believe that it is not being handled rightly.