Did you had a look at [1]? Here you can find a example how to
marshall/unmarshall in Camel.

[1] http://camel.apache.org/jaxb.html

Best,
Christian

On Tue, Feb 21, 2012 at 1:26 PM, Samruben <[email protected]> wrote:

> Hi I have tried an example to marshal and unmarshal in the router using
> jaxb.I need to pass the jaxb dataformat object as reference to the xml flow
> and do the marshalling and unmarshalling.
>
>
> my router without marshal:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <routes xmlns="http://camel.apache.org/schema/spring";>
>
>  <route>
>            <from uri="text-jms:queue:orderjax.queue"/>
>            <marshal ref="jaxb"/>
>            <to uri="text2-jms:queue:orderrecevied.queue"/>
>        </route>
>
>
>  </camelContext>
>
> but it shows me error that
>
> Exception in thread "main" org.apache.camel.CamelExecutionException:
> Exception occurred during execution on the exchange: Exchange[Message:
> <?xml
> version="1.0" encoding="UTF-8" standalone="yes"?>
> <purchaseOrder amount="1.0" price="4995.0" name="Camel in Action"/>
> ]
>        at
>
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1212)
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/passing-jaxb-object-to-xml-tp5502038p5502038.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to