Try to convert the MessageContentList into your Payload object first: <route id="route_1"> <from uri="cxf:bean:PowerConsumptionEndpoint" /> <convertBodyTo type="org.apache.camel.Foo"/> <marshal> <jaxb prettyPrint="false" contextPath="org.apache.camel" /> </marshal> <to uri="activemq:REJI_INboundQ" /> </route>
I also recommend to add a: <convertBodyTo type="java.lang.String"/> before your send the message to ActiveMQ. Otherwise you send a byte[] to ActiveMQ which is not easy readable by browsing the queue... Best, Christian ----------------- Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Thu, Sep 12, 2013 at 6:49 AM, contactreji <contactr...@gmail.com> wrote: > Hi > > I have tried to marshal the exchange coming from cxf endpoint before > putting > into the ActiveMQ Queue. > > *<route id="route_1"> > > <from uri="cxf:bean:PowerConsumptionEndpoint" /> > > <marshal> > <jaxb prettyPrint="false" > contextPath="org.apache.camel" /> > </marshal> > <to uri="activemq:REJI_INboundQ" /> > > </route>* > > > It gives deployment successful but when data is triggerred, it gives > following exception > > java.io.IOException: javax.xml.bind.JAXBException: class > org.apache.cxf.message.MessageContentsList nor any of its super class is > known to this context. > > Could you tell me how to modify the configuration so that this error is > resolved > > Reji > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/JAXB-Marshalling-tp5739202.html > Sent from the Camel - Users mailing list archive at Nabble.com. >