THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
JiBX
Available as of Camel 2.6
JiBX is a Data Format which uses the JiBX library to marshal and unmarshal Java objects to and from XML.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <!-- Define data formats --> <dataFormats> <jibx id="jibx" unmarshallClass="org.apache.camel.dataformat.jibx.PurchaseOrder"/> </dataFormats> <!-- marshalMarshal message to XML --> <route> <from uri="direct:marshal"/> <marshal ref="jibx"/> <to uri="mock:result"/> </route> <!-- unmarshalUnmarshal message from XML --> <route> <from uri="direct:unmarshal"/> <unmarshal ref="jibx"/> <to uri="mock:result"/> </route> </camelContext> |
...
If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions).
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jibx</artifactId> <version>2.6.0</version> </dependency> |