You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload one of your sample files (microcks\samples\HelloAPI-soapui-project.xml) and the dispatching does not work in this case..
The dispatcher always returns the first loaded response instead of the response corresponding to the invoked request
09:25:52.596 INFO 1 --- [80-exec-10] i.github.microcks.web.RestController : Servicing mock response for service [Hello+API+Mock, 0.8] on uri /rest/Hello+API+Mock/0.8/v1/hello with verb GET
09:25:52.596 DEBUG 1 --- [80-exec-10] i.github.microcks.web.RestController : Request body: null
09:25:52.596 DEBUG 1 --- [80-exec-10] i.github.microcks.web.RestController : Found resourcePath: /v1/hello
09:25:52.600 DEBUG 1 --- [80-exec-10] i.github.microcks.web.RestController : Found a valid operation /v1/hello with rules: // Script dispatcher is used to select a response based on the incoming request.
// Here are few examples showing how to match based on path, query param, header and body
// Match based on query parameter
def queryString = mockRequest.getRequest().getQueryString()
log.info "QueryString: " + queryString
if( queryString.contains("David") )
{
// return the name of the response you want to dispatch
return "David Response"
}
else if( queryString.contains("Gavin") )
{
// return the name of the response you want to dispatch
return "Gavin Response"
}
else return "Unknown Response"
09:25:52.609 INFO 1 --- [80-exec-10] i.g.m.u.s.SoapUIScriptEngineBinder : QueryString: user=David
09:25:52.610 DEBUG 1 --- [80-exec-10] i.github.microcks.web.RestController : Dispatch criteria for finding response is
09:25:52.615 DEBUG 1 --- [80-exec-10] i.github.microcks.web.RestController : No responses found so far, tempting with just bare operationId...
09:25:52.617 DEBUG 1 --- [80-exec-10] i.g.m.web.MockControllerCommons : Mock invocation event has been published
09:25:52.617 DEBUG 1 --- [ task-9] i.g.m.listener.DailyStatisticsFeeder : Received a MockInvocationEvent on Hello API Mock - v0.8
09:25:52.618 DEBUG 1 --- [ task-9] i.g.m.listener.DailyStatisticsFeeder : hourKey for statistic is 9
09:25:52.618 DEBUG 1 --- [ task-9] i.g.m.listener.DailyStatisticsFeeder : minuteKey for statistic is 565
09:25:52.621 DEBUG 1 --- [ task-9] i.g.m.listener.DailyStatisticsFeeder : Found an existing statistic document for 20210219
09:25:52.623 DEBUG 1 --- [ task-9] i.g.m.listener.DailyStatisticsFeeder : Processing of MockInvocationEvent done !
09:25:52.746 DEBUG 1 --- [ Thread-6] SoapUIMultiThreadedHttpConnectionManager : Closing expired connections
09:25:52.747 DEBUG 1 --- [ Thread-6] SoapUIMultiThreadedHttpConnectionManager : Closing connections idle longer than 30 SECONDS
The text was updated successfully, but these errors were encountered:
Upload one of your sample files (microcks\samples\HelloAPI-soapui-project.xml) and the dispatching does not work in this case..
The dispatcher always returns the first loaded response instead of the response corresponding to the invoked request
The text was updated successfully, but these errors were encountered: