aholzinger
11 years agoOccasional Contributor
NullPointerException using maven-plugin with MTOM attachment
Hi,
I'm using soapUI 4.6.1. My application integrates via web services to a server (Apache CXF, HTTPS).
The service is mocked out by a soapUI project using the maven-soapui-plugin.
It works well for some basic scenarios (request and responses are processed and mocked successfully).
One scenario is to have an MTOM attachment in the response. Running a maven build produces the following output:
A successful response from the mock is shown like this:
The soapui-maven-plugin starts correctly within the maven build. See attached log file.
I followed the documentation on the settings and attributes for attachments.
I have attached the soapui project, the complete maven build log, the pom.xml.
Any idea whats wrong?
Thanks,
Alfred
I'm using soapUI 4.6.1. My application integrates via web services to a server (Apache CXF, HTTPS).
The service is mocked out by a soapUI project using the maven-soapui-plugin.
It works well for some basic scenarios (request and responses are processed and mocked successfully).
One scenario is to have an MTOM attachment in the response. Running a maven build produces the following output:
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.getAttachmentsForPart(WsdlMockResponse.java:594)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.AttachmentUtils.prepareMessagePart(AttachmentUtils.java:220)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.writeResponse(WsdlMockResponse.java:637)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.execute(WsdlMockResponse.java:311)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(WsdlMockOperation.java:259)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchPostRequest(WsdlMockRunner.java:290)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:375)
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:715)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
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:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:713)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
14:58:42,946 INFO [SoapUIMockServiceRunner] Handled request 1; [getNextElsterXml] with [OkResponse] in [43ms] at [2013-10-29 14:58:42.894]
A successful response from the mock is shown like this:
15:53:56,032 INFO [SoapUIMockServiceRunner] Handled request 3; [getNextElsterXml] with [EmptyResponse] in [7ms] at [2013-10-29 15:53:56.020]
The soapui-maven-plugin starts correctly within the maven build. See attached log file.
I followed the documentation on the settings and attributes for attachments.
I have attached the soapui project, the complete maven build log, the pom.xml.
Any idea whats wrong?
Thanks,
Alfred