Hi!
I've beeen trying to use the HTTP Monitor with some REST Mock Services and had some trouble.
I'm currently using SoapUI 5.1.3.
When I send a request to the service, I usually get te expected response and everything's fine. However, when I set up the HTTP Monitor and get it running, I receive a 500 - INTERNAL SERVER ERROR and the following stack trace is printed:
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.AbstractMessageExchange.<init>(AbstractMessageExchange.java:33)
at com.eviware.soapui.impl.wsdl.submit.AbstractWsdlMessageExchange.<init>(AbstractWsdlMessageExchange.java:36)
at com.eviware.soapui.impl.wsdl.monitor.WsdlMonitorMessageExchange.<init>(WsdlMonitorMessageExchange.java:28)
at com.eviware.soapui.impl.wsdl.monitor.JProxyServletWsdlMonitorMessageExchange.<init>(JProxyServletWsdlMonitorMessageExchange.java:81)
at com.eviware.soapui.impl.wsdl.monitor.jettyproxy.ProxyServlet.service(ProxyServlet.java:143)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at com.eviware.soapui.impl.wsdl.monitor.jettyproxy.JettyServer.handle(JettyServer.java:76)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
After going over some of the source code, I finally found what I think is the problem in the class JProxyServletWsdlMonitorMessageExchange.
It looks like in line 81, super() is called with null as an argument. When finally this super call ends up calling the constructor in AbstractMessageExchange, the modelItem is null and at line 33 the call of a get method throws a NullPointerException.
I hope this bug can be fixed soon.
I have a similar issue using the MockAsWarServlet in version 5.2.0 when I click on the link for my REST mock (which paradoxically ends with ?WSDL):
Hi,
I see the same issue in version SoapUI 5.2.0
The steps causing the error are:
1. I create project
2. Then start HTTP Monitor on port 8087
3. Trying to access the localhost:8087 and getting the exception:
Last edit: Ayrat Natfullin 2015-09-09
Same issue on SoapUI 5.2.1 with rest services. Similars steps that Ayrat with 1080 port.
I have the same issue in version 5.3.0.
As you can see in the stacktrace and the source files on github, you are creating a new instance of a JProxyServletWsdlMonitorMessageExchange. Internally it calls super constructors with an null element, that crashes in the constructor of AbstractMessageExchange, because the modelItem is null:
this bug still present on 5.4.0