Thursday, January 6, 2011

Committed JiBX data format for Camel

I have just committed new JiBX data format to the Apache Camel project.

Camel is an amazing routing engine serving as a core for the best ESB implementation ever i.e. ServiceMix. JiBX is the high performance XML binding library for Java.

Since now you can (un)marshal your Camel messages with out of the box JiBX support, without need to create your custom JiBX components.

New JiBX component will be available with the 2.6.0 release of Apache Camel.

You can use JiBX component with both Java DSL...

// Marshal message to XML using Java DSL.

// Unmarshal message from XML.

... and Spring DSL...

<camelContext id="camel" xmlns="">

  <!-- Define data formats -->
    <jibx id="jibx" unmarshallClass="org.apache.camel.dataformat.jibx.PurchaseOrder"/>

  <!-- Marshal message to XML -->
    <from uri="direct:marshal"/>
    <marshal ref="jibx"/>
    <to uri="mock:result"/>

  <!-- Unmarshal message from XML -->
    <from uri="direct:unmarshal"/>
    <unmarshal ref="jibx"/>
    <to uri="mock:result"/>



No comments:

Post a Comment