Hi Charles Convertion from the dataformat JAXB to Order is supported out of the box in Camel with its Data Format: http://activemq.apache.org/camel/data-format.html
And the JAXB: http://activemq.apache.org/camel/jaxb.html DataFormat jaxb = new JaxbDataFormat("com.mycompany"); // where com.mycompany is the package where your domain objecs it - eg Order from("File:///c:/temp"). unmarshal(jaxb). to("bean:save); Then your Order class must be annotated with the JAXB annotations for this. And you should have a jaxb.index file the JAXB classes you have in the package = Order. For examples see the camel-jaxb component that has a unit DataFormatTest that does something like the above. See this unit test and its related files and you will have something to go along with. Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: cmoulliard [mailto:[EMAIL PROTECTED] Sent: 4. juli 2008 18:05 To: [email protected] Subject: How can I set the content of the body when I left a bean and before to go to the next bean ? Hi, In a bean component receiving a message, I would like to transform the content of a object received from something into something different (like from JAXB towards Order object). To achieve this, I create a pipeline routes : from("File:///c:/temp"). to("bean:converter). to("bean:save"); Unfortunately, when I define : in.getOut().setBody(order, Order.class) after the transformation step in order to send the message to my bean : save, I see that the message is send back to my bean converter and not propagated to the bean : save !!!! Where is the issue ? How Can I put the order object into the message that Camel will send to bean : save Regards, Charles -- View this message in context: http://www.nabble.com/How-can-I-set-the-content-of-the-body-when-I-left-a-bean-and-before-to-go-to-the-next-bean---tp18282228s22882p18282228.html Sent from the Camel - Users mailing list archive at Nabble.com.
