camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: How can I set the content of the body when I left a bean and before to go to the next bean ?
Date Fri, 04 Jul 2008 18:28:48 GMT
Hi Charles

Convertion from the dataformat JAXB to Order is supported out of the box in Camel with its
Data Format:

And the JAXB:

DataFormat jaxb = new JaxbDataFormat("com.mycompany");
// where com.mycompany is the package where your domain objecs it - eg Order


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
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
-----Original Message-----
From: cmoulliard [] 
Sent: 4. juli 2008 18:05
Subject: How can I set the content of the body when I left a bean and before to go to the
next bean ?


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 :


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


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message