Hi:
if wsdl operation's input message is empty(zero part), but output message has
multi part. then the generated JAXWS service will raise NullPointer Exception;
Such a wsdl is not practical , only for marginal testing;
version : CXF-2.3.3; I haven't try the latest CXF version;
Here is a example:
<wsdl:message name="notifyRequest">
</wsdl:message>
<wsdl:message name="notifyReponse">
<wsdl:part name="r0" element="ns:SimpleSymbol"/>
<wsdl:part name="r1" element="ns:Symbol"/>
</wsdl:message>
<wsdl:operation name="notify">
<wsdl:input message="axis2:notifyRequest">
</wsdl:input>
<wsdl:output message="axis2:notifyReponse">
</wsdl:output>
</wsdl:operation>
JAXWS Operation is :
public void notify(Holder<String> r0, Holder<SymbolType> r1) {
}
Analyse:
Because when <soap:Body> has no child element, the DocLiteralInterceptor
doesn't create a MessageContentsList ( because input is nothing)
But HolderInInterceptor will always except the MessageContentsList exists;
so nullPointer raised while accesing the MessageContentsList
Exception Stack Trace:
java.lang.NullPointerException
at
org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:78)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:322)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:291)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:936)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:873)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581)
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1057)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:807)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:526)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:41)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528)
at java.lang.Thread.run(Thread.java:595)