cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: NullPointer Exception of JAXWS interface
Date Fri, 13 Jan 2012 16:35:38 GMT
On Friday, January 13, 2012 3:41:16 PM xuhb wrote:
> Hi, Dan:
>     
> I've tried the lates version 2.5.1, the problem still exists.  

Any chance you can create a small "hello world" type test case and submit a 
JIRA?

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

We made some changes down in the core for camel (since camel really wouldn't 
be using JAX-WS for this).  Thus, it's likely that the JAX-WS/frontend layers 
may also need some updates for this usecase as well.    A testcase would be a 
big help.

Dan


 
> 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(Ho
> >> lderI
 nInterceptor.java:78)
> > 
> > at
> > 
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
> >> rChai
 n.java:255) at
> >> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
> >> tionO
 bserver.java:113) at
> >> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceReques
> >> t(Jet
 tyHTTPDestination.java:322) at
> >> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Jet
> >> tyHTT
 PDestination.java:291) at
> >> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPH
> >> andle
 r.java:72) at
> >> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandle
> >> r.jav
 a:936) at
> >> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler
> >> .java
>> 
> >> :873) at
> >> 
> >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.ja
> >> va:11
 7) at
> >> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Conte
> >> xtHan
 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.j
> >> ava:5
 81)
> > 
> > at
> > 
> >> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpCon
> >> necti
 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:41
> >> 1) at
> >> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
> >> dPoint .java:526) at
> >> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndP
> >> oint.
 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

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Mime
View raw message