Using the XStream jar
In Xml
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<xstream id="XstreamTransformator"/>
</dataFormats>
<route>
<from uri="direct:messageSource"/>
<marshal ref="XstreamTransformator"/>
<to uri="activemq:queue:myQueue"/>
</route>
<route>
<from uri="activemq:queue:myQueue"/>
<unmarshal ref="XstreamTransformator"/>
<to uri="direct:messageDest"/>
</route>
</camelContext>
In code
from("uri:activemq:queue: myQueue").unmarshal().xstream().to("direct: messageDest");
אין תגובות:
הוסף רשומת תגובה