Forum Discussion

dschulten's avatar
New Contributor
6 years ago

5.5.0 OpenSource: Second QUERY_MATCH mock request to same method returns 500

I have a mock server for my wsdl with a mock response for one of its methods. As long as I had only one response and used SEQUENCE, I could call the method as often as I want.

Now I wanted a second mock response with a different response body which is returned under a condition, while otherwise giving the first response.

I added the new response to the method and switched to QUERY_MATCH. I chose the first response as default, and wrote an XPath expression which chooses the second response.

Instead of giving the default response, the mock server now responds with 500 unless I send a matching request for the new response. IOW it never gives me the first response.

When I add a QUERY_MATCH for the first response as well, the mock server responds with that response exactly once, but gives me 500 for each subsequent call to the same method.

The default for QUERY_MATCH seems broken in SoapUI 5.5.0, or did I miss sth?

1 Reply

  • dschulten's avatar
    New Contributor

    in 5.5.0 OSS, if you start soapui.bat, you see lots of errors AutoDiscoveryMethodFactory ClassNotFoundException. Once I deactivated all plugins, mocking with XPath expressions kind of works again.


    But both in 5.2.1 and 5.5.0 a problem remains: if the xpath expression does not match, then soap ui returns 500 instead of the default response I have defined, and I see this error in the logs:


    2019-05-11 10:30:49,358 ERROR [errorlog] com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to find MockResponse
    com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to find MockResponse
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(
    at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(
    at org.mortbay.jetty.handler.HandlerCollection.handle(
    at org.mortbay.jetty.handler.HandlerWrapper.handle(
    at org.mortbay.jetty.Server.handle(
    at org.mortbay.jetty.HttpConnection.handleRequest(
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(
    at org.mortbay.jetty.HttpParser.parseNext(
    at org.mortbay.jetty.HttpParser.parseAvailable(
    at org.mortbay.jetty.HttpConnection.handle(
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

    I would expect that SoapUI returns the default response instead of 500.