This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Smooks Mediator can be used to apply lightweight transformations on messages in an efficient manner. Smooks is a powerful framework for processing, manipulating and transforming XML. More information about Smooks can be obtained from the official Smooks website.

The Smooks Mediator requires the transformation definition to be passed in as an external resource. This transformation can be specified as a local entry or be stored in the registry. The mediator UI enables you to point the mediator to an existing local entry or a registry resource.


<smooks [config-key="string"]>
   <input [type="|text|xml"]  [regex="regex"]/>
   <output [type="|text|xml"]  [regex="regex"] [property="string"] [action="string"]/>

UI Configuration

  • Config-Key
  • Input - User can define an input as:
    • Text
    • XML
    • Expression - Specify an xPath as an expression to pick the exact message block. Else, the entire 'message body' will be selected by default.
  • Output - Similar to input, the user can define how the output should be. When the user defines an output expression, there are additional operations that can be performed.
    • Add - The selected node will be added as a child to the message.
    • Replace - Selected node will be replaced in the message.
    • Sibling - Selected node will be added as a sibling.


When the user defines an Output as a Property, the property will be saved in the messagecontext for future uses.

  • No labels