cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <...@envoisolutions.com>
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/
Date Mon, 30 Oct 2006 17:00:45 GMT
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


Mime
View raw message