Posts

Showing posts from March, 2015

XML to XML transformation via Smooks Mediator in WSO2 ESB

Smooks is an extensible framework for building applications for processing XML and non XML data (CSV, EDI, Java etc). This example demonstrates how xml to xml transformation can be done using the smooks mediator in WSO2 ESB. WSO2 ESB provides XSLT, FastXSLT, Enrich, PayloadFactory, Smooks and XQuery mediators to transform messages from XML to XML. Choice of a particular mediator out of these, depends on the complexity of the use case. For a simple transformation  enrich or PayloadFactory would be the best choice. For a complex transformation XSLT, FastXSLT, XQuery or Smooks can be used. In this article I will use smooks mediator for xml to xml transformation.

Having said that let’s get some hands on smooks using WSO2 ESB. For this sample I am using WSO2ESB 4.8.1 version. First locate the axis2.xml file under the $ESB_HOME/repository/conf/axis2 directory and enable vfs transport. For this uncomment the vfs transport sender and receiver elements.  Then move on to $ESB_HOME/bin directory…