cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: getUnwrappedOperation returns null
Date Wed, 17 Mar 2010 03:35:36 GMT
On Tuesday 16 March 2010 11:33:05 am Enrico Boldrini wrote:
> Dear Dan,
> 
> I'm attaching a test project with a JUnit test which fails on the error.
> Hoping this will help, kind regards.

I've added a better error message for this case, but the problem is with the 
WSDL.   The "close" method is not unwrappable according to the wsdl, but the 
interface you are using has it unwrapped.   That's the NPE while it tries to 
find an unwrapped form.

The issue is:
 <xs:element name="CloseResponse" nillable="true" type="xs:anyType" />

the xs:anyType isn't allowed for a wrapper.    It PROBABLY should be 
tns:closeResponse, but I'm not 100% sure.

Dan



> 
> Enrico
> 
> Enrico Boldrini wrote:
> > Dear Dan,
> > 
> > for the quick response. Unfortunately it doesn't work either with
> > 2.2.7-SNAPSHOT. Stack trace:
> > 
> > Exception in thread "main" java.lang.NullPointerException
> > 
> >    at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeCla
> > ssInfo(ReflectionServiceFactoryBean.java:754)
> > 
> >    at
> > 
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperat
> > ion(JaxWsServiceFactoryBean.java:222)
> > 
> >    at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSD
> > LOperations(ReflectionServiceFactoryBean.java:674)
> > 
> >    at
> > 
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperat
> > ions(JaxWsServiceFactoryBean.java:258)
> > 
> >    at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceF
> > romWSDL(ReflectionServiceFactoryBean.java:424)
> > 
> >    at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSer
> > viceModel(ReflectionServiceFactoryBean.java:528)
> > 
> >    at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflec
> > tionServiceFactoryBean.java:278)
> > 
> >    at
> > 
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceF
> > actoryBean.java:178)
> > 
> >    at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:411)
> >    at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:296)
> >    at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:291)
> >    at javax.xml.ws.Service.getPort(Service.java:161)
> > 
> > Kind regards,
> > 
> > Enrico
> > 
> > Daniel Kulp wrote:
> >> Can you try the 2.2.7-SNAPSHOTs?    I fixed a very similar bug a
> >> couple weeks ago that had a very similar stack trace and symptom.
> >> Thus, this may already be fixed.
> >> 
> >> Dan
> >> 
> >> On Tuesday 16 March 2010 6:40:23 am Enrico Boldrini wrote:
> >>> Dear all,
> >>> 
> >>> I've got a null pointer exception instantiating a CXF client to connect
> >>> to my CXF service and using in both cases version 2.2.6. This is the
> >>> stacktrace:
> >>> 
> >>> java.lang.NullPointerException
> >>> 
> >>>     at
> >>> 
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeC
> >>> lass
> >>> 
> >>> Info(ReflectionServiceFactoryBean.java:721) at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOper
> >>> atio
> >>> 
> >>> n(JaxWsServiceFactoryBean.java:222) at
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeW
> >>> SDLO
> >>> 
> >>> perations(ReflectionServiceFactoryBean.java:674) at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOper
> >>> atio
> >>> 
> >>> ns(JaxWsServiceFactoryBean.java:258) at
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServic
> >>> eFro
> >>> 
> >>> mWSDL(ReflectionServiceFactoryBean.java:424) at
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeS
> >>> ervi
> >>> 
> >>> ceModel(ReflectionServiceFactoryBean.java:528) at
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refl
> >>> ecti
> >>> 
> >>> onServiceFactoryBean.java:278) at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServic
> >>> eFac
> >>> 
> >>> toryBean.java:178) at
> >>> org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:411) at
> >>> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:296) at
> >>> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:291) at
> >>> javax.xml.ws.Service.getPort(Service.java:161)
> >>> 
> >>> It seems to happen because o = o.getUnwrappedOperation(); in method
> >>> initializeClassInfo returns null.
> >>> 
> >>> The problem disappear if using JAXWS-RI for the client, while
> >>> continuing
> >>> to use CXF for the service.
> >>> 
> >>> Let me know if further information is needed, thanks
> >>> 
> >>> Enrico

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message