Dan,
Thanks for you reply. I am now getting a NPE in
JaxWsServiceFactoryBean.initializeParameter().
Regards,
William
Caused by: java.lang.NullPointerException
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter
(JaxWsServiceFactoryBean.java:248)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter
(JaxWsServiceFactoryBean.java:230)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initalizeClassInfo(
JaxWsServiceFactoryBean.java:213)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOpera
tion(JaxWsServiceFactoryBean.java:122)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWS
DLOperations(ReflectionServiceFactoryBean.java:237)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:177)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:115)
at
org.mule.providers.wsdl.cxf.CxfMessageReceiver.init(CxfMessageReceiver.j
ava:55)
... 29 more
-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED]
Sent: Monday, October 30, 2006 12:01 PM
To: [email protected]
Cc: [email protected]
Subject: Re: svn commit: r469066 [1/3] - in /incubator/cxf/trunk:
api/src/main/java/org/apache/cxf/databinding/
api/src/main/java/org/apache/cxf/service/model/
common/common/src/main/java/org/apache/cxf/configuration/spring/
common/common/src/test/java/org/apache/
Hi William,
As I noted in the commit message, the JAXB databinding works differently
now. The ServiceFactory is now responsible for traversing your service
class and setting the classes on the service model. This removes the
coupling the JAXB databinding had on JAX-WS and also on the notion that
there is always one service class per service (there could be more...).
Then in JAXBDataBinding.initialize(ServiceInfo) we look at the classes
and add them to the context. Calling new JAXBDatabinding(class) will add
that class directly to the context. I would suggest using the
JaxWsServiceFactory to build up your service.
Cheers,
- Dan
Tam, William wrote:
> Hi Dan,
>
> Prior to this change, I was able to create a "new
> JAXBDataBinding(myClazz)" where myClazz is an interface. It looks
like
> I can no longer construct a JAXBDataBinding object with an interface.
> The following is the stack trace. It is important for me to be able
to
> pass an interface as opposed to an impl class. Do you have any
> suggestions?
>
> Regards,
> William
>
> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1
> counts of IllegalAnnotationExceptions
> org.apache.hello_world_doc_lit.Greeter is an interface, and JAXB can't
> handle interfaces.
> this problem is related to the following location:
> at org.apache.hello_world_doc_lit.Greeter
>
> at
>
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Il
> legalAnnotationsException.java:66)
> at
>
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextIm
> pl.java:361)
> at
>
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
> 217)
> at
>
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
> at
>
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
> at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at
>
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext(JAXBDataBinding.ja
> va:257)
> at
> org.apache.cxf.jaxb.JAXBDataBinding.<init>(JAXBDataBinding.java:90)
> at
>
org.mule.providers.wsdl.cxf.CxfMessageReceiver.createCxfServiceFactory(C
> xfMessageReceiver.java:146)
> ... 30 more
>
>
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog