cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manu <mekt...@gmail.com>
Subject Re: Problem Mixing dataFormat with Camel & CXF
Date Thu, 03 Jul 2014 12:54:52 GMT
No idea from anyone ?


On Thu, Jun 12, 2014 at 12:07 PM, Manu <mektoub@gmail.com> wrote:

> I think this is more a CXF issue than a Camel one so I give a try here :)
>
> In the same Camel route, I have to mix POJO and MESSAGE dataFormat but I
> seems ... complicated :)
>
> The input endpoint is in POJO dataFormat and the requested (called within
> the route) is in MESSAGE dataFormat.
> The problem appears when trying to send a response back from the route
> after calling the external endpoint :
>  - Either I create a POJO Bean response then get an endpoint response in
> the SOAP Body
>  - Or I create (or marshall the response) then get the following exception
> from CXF
>
> 2014-06-12 12:04:04,605 [qtp194052007-17] WARN  PhaseInterceptorChain
>      - Interceptor for {http://in.order}InOrderEndpointService#{
> http://in.order}order has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Marshalling Error: class
> java.io.ByteArrayInputStream ni aucune de ses superclasses n'est connue
> dans ce contexte.
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:263)
>  at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:168)
> at
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:112)
>  at
> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>  at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>  at
> org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:231)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>  at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:348)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:312)
>  at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
>  at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>  at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:188)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
>  at org.eclipse.jetty.server.Server.handleAsync(Server.java:394)
> at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:446)
>  at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:48)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
>  at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
>  at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.xml.bind.MarshalException
>  - with linked exception:
> [javax.xml.bind.JAXBException: class java.io.ByteArrayInputStream ni
> aucune de ses superclasses n'est connue dans ce contexte.]
>  at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:326)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251)
>  at
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:597)
>  at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:238)
> ... 24 more
> Caused by: javax.xml.bind.JAXBException: class
> java.io.ByteArrayInputStream ni aucune de ses superclasses n'est connue
> dans ce contexte.
>  at
> com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:247)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:262)
>  at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:653)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:156)
>  at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:131)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:333)
>  at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:340)
> at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:76)
>  at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
>  ... 28 more
> Caused by: javax.xml.bind.JAXBException: class
> java.io.ByteArrayInputStream ni aucune de ses superclasses n'est connue
> dans ce contexte.
>  at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:588)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:648)
>
> I've joined a simple testcase (with a SOAP UI Project for the mock
> service).
> Does anyone have a clue on what is going on ?
>
> Thanks
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message