If you checked out Milestone 1, you might have noticed that the data type transformations were simply Java classes which implemented our Transformer<F,T> contract.  This route works great for quick conversions, silly examples (natch), or sophisticated mappings which require tight control over the transformation behavior.  Most transformation use cases will likely benefit from purpose-built transformers which handle generalized mapping tasks and can be configured for specific transformations.   The first example of this in SwitchYard is the Smooks Transformer.

 

Smooks transforms can be added to a SwitchYard application by adding a <transform.smooks> declaration in switchyard.xml.

 

<transforms>

   <transform.smooks type="JAVA2XML"

      from="java:org.switchyard.quickstarts.transform.smooks.OrderAck"

      to="{urn:switchyard-quickstarts:transform-smooks:1.0}submitOrderResponse"

      config="/smooks/OrderAck_XML.xml"/>

</transforms>

 

The above should look very familiar if you checked out the configuration generated from m1app.  Just like a Java-based transformation, you specify the from and to types for the transform instance.  The config parameter points to a Smooks transformation definition, which gives you the full power of Smooks to transform Java, XML, EDI, CSV, and loads more.

 

We have added a new quickstart, transform-smooks, to our quickstarts repository if you want to see this in action. 

The SwitchYard team is happy to announce the arrival of our first milestone release!  You can read all about it in the Milestone 1 Overview, which provides a summary of what's in Milestone1 along with links to detailed information on the features in the release.   From the overview:

 

There a number of options for checking out what SwitchYard M1 has to offer.  Listed in order of increasing time investment:

 

Take a gander and let us know what you think.

Filter Blog

By date:
By tag: