Hi, There is a FallbackTypeConverter[1] will help you do this kind of job of the message body's class is annotated with JAXB annotations. If you put the camel-jaxb into your class path, this fallback type converter will be used by default.
If you don't want to use it , you need to convert the message body yourself before the fallback type converter get to work :) [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java Willem Leonard Axelsson wrote: > > Hi, > > At my current gig we have a route roughly like the one below where we send > in objects using the ProducerTemplate. Those are marshalled into xml using > JAXB (annotations) and then sent on to a JMS queue. > > jaxb = new JaxbDataFormat("com.entraction.elp.api.message"); > > from("direct:in") > .marshal(jaxb) > .to("jms:someQueue") > > > What I found by mistake was that the route worked even if I remove the > marshalling step. The object will automatically, it seems, be marshalled. > My > questions is, is this the right behaviour and if it is, where is this > feature documented? Automatic marshalling is nice, but I would like to > know > for sure that it's intended and not a side effect of something else we do. > > Regards, > /Leo > > --------------------------------------------------------- > Leonard Axelsson > Agical AB > > E-mail: [email protected] > Blog: http://xlson.com/ > Twitter: xlson > -- View this message in context: http://camel.465427.n5.nabble.com/Documentation-for-automatic-marshalling-and-unmarshalling-tp4255275p4258140.html Sent from the Camel - Users mailing list archive at Nabble.com.
