THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
JAXB
JAXB is a Data Format which uses the JAXB2 XML marshalling standard which is included in Java 6 to unmarshal an XML payload into Java objects or to marshal Java objects into an XML payload.
For example the following uses a named DataFormat of jaxb which is configured with a number of Java package names to initialize the JAXBContext.
Code Block |
---|
DataFormat jaxb = new JaxbDataFormat("com.acme.model");
from("activemq:My.Queue").
unmarshal(jaxb).
to("mqseries:Another.Queue");
|
You can if you prefer use a named reference to a data format which can then be defined in your Registry such as via your Spring XML file. e.g.
Code Block |
---|
from("activemq:My.Queue").
unmarshal("myJaxbDataType").
to("mqseries:Another.Queue");
|
...