Monday, September 27, 2010

Custom XStream driver configuration added to Camel XStream data format

Apache Camel provides support for XStream data transformation. However until now it was very difficult to provide XML pull parser driver different then default XppDriver. Few days ago I created patch for Apache Camel XStream data format (with help from Willem Jiang with hacking Spring DSL for it). My improvment has been submitted to the Camel codebase. It should be included in Camel 2.5 .

Now you can pass reference of the HierarchicalStreamDriver instance directly in the Spring DSL with driverRef attribute:

<bean id="jsonDriver" 

<camelContext id="camel" xmlns="">
    <xstream id="xstream" driverRef="jsonDriver"/>            

    <from uri="direct:start"/>
    <marshal ref="xstream"/>
    <to uri="mock:result"/>

No comments:

Post a Comment