cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuhb" <x...@tongtech.com>
Subject Re: NullPointer Exception of JAXWS interface
Date Fri, 13 Jan 2012 07:41:16 GMT
Hi, Dan:
    
I've tried the lates version 2.5.1, the problem still exists. 

So maybe you patch hasn't been included in the lates version , could you tell me the issue
which you fixed?

Thanks a lot

----- Original Message ----- 
From: "Daniel Kulp" <dkulp@apache.org>
To: <dev@cxf.apache.org>
Cc: "xuhb" <xuhb@tongtech.com>
Sent: Friday, January 13, 2012 6:52 AM
Subject: Re: NullPointer Exception of JAXWS interface


> On Wednesday, January 11, 2012 12:14:20 PM xuhb wrote:
>> 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;
> 
> 
> This sounds very familiar to some issues related to empty soap:body things 
> that I had to fix for some camel related tests.  Thus, it may already be fixed 
> with a more recent version of CXF.
> 
> Dan
> 
> 
>> 
>> 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(HolderI
>> nInterceptor.java:78)
> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>> n.java:255) at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO
>> bserver.java:113) at
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jet
>> tyHTTPDestination.java:322) at
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTT
>> PDestination.java:291) at
>> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandle
>> r.java:72) at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.jav
>> a:936) at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java
>> :873) at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:11
>> 7) at
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHan
>> dlerCollection.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:5
>> 81)
> at
>> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnecti
>> on.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)
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
Mime
View raw message