I believe I'm doing all this. I don't get null anymore, but what I get now is
an XFireFault saying "Could not marshall type". This comes from a
JAXBException "se.a.b.c" doesnt contain ObjectFactory.class or jaxb.index".
Any clues? I'm a little confused if a need to specify marshaller or any
other "helper" class, or if all this should be handled automatically as long
as I specify annotations ("jsr181") and typeMapping ("jaxb2")?
In the stack trace I see AegisBindingProvider being used, which surprises me
as I thought that was some other kind of binding than jaxb2...

DEBUG - HandlerPipeline                - Invoking handler
org.codehaus.xfire.service.binding.PostInvocationHandler in phase service
DEBUG - HandlerPipeline                - Invoking phase post-invoke
DEBUG - HandlerPipeline                - Invoking phase policy
DEBUG - HandlerPipeline                - Invoking phase user
DEBUG - HandlerPipeline                - Invoking phase transport
DEBUG - HandlerPipeline                - Invoking phase send
DEBUG - HandlerPipeline                - Invoking handler
org.codehaus.xfire.handler.OutMessageSender in phase send
ERROR - PostInvocationHandler          -
org.codehaus.xfire.fault.XFireFault: Could not marshall type.
INFO  - DefaultFaultHandler            - Fault occurred!
javax.xml.bind.JAXBException: "se.a.b.c" doesnt contain ObjectFactory.class
or jaxb.index
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
        at
org.codehaus.xfire.jaxb2.JaxbType.getJAXBContext(JaxbType.java:294)
        at org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:218)
        at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:200)
        at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
        at
org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
        at
org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:76)
        at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at
org.codehaus.xfire.service.binding.PostInvocationHandler.invoke(PostInvocationHandler.java:36)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.doProcess(Jsr181ExchangeProcessor.java:113)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:68)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:410)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:177)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:227)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)



gnodet wrote:
> 
> On 11/16/06, Anders Hammar <[EMAIL PROTECTED]> wrote:
>> Having said this, I'm struggling with getting two jsr181 services talking
>> to
>> each other passing objects of my object model. I'm seeing null being
>> passed
>> between them, not my objects, so I could be completely wrong here. But I
>> don't think so and someone could probably verify that.
> 
> If you use jaxb2 binding, you need to either specify it explicitely
> on the jsr181 endpoint or to put a @WebService annotation, which
> should automatically switch to jaxb2.
> Also, if the xml is not valid wrt to the wsdl, XFire does not always
> return errors and sometimes just return null instead.
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: 
http://www.nabble.com/connecting-to-jsr-181-jaxb2-tf2523299s12049.html#a7380030
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to