Smooks Mediator

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.

Configurations

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 transformation configuartion : Smooks mediator requires the transformation definition to be passed in as an external resource.
  • Input : User can define an 'input' as a 'Text' or 'XML' and need to provide a 'xpath' expression to pick exact message block, else by default whole 'message body' will be selected by default.
  • Output : Same like in input, user can define how his output should be

Syntax

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

UI Configuration

Smooks Mediator

Smooks Mediator Configuartion

Configurations

  • Configuration Key:
  • Smooks transformation definition to can be specified as a local entry or be stored in the registry.

  • Input :
  • User can define an 'input' as a 'Text' or 'XML' and need to provide a 'xpath' expression to pick exact message block, else by default whole 'message body' will be selected by default.

  • Output :
  • Same like in input, user can define how his output should be. When user defines an 'output' expression there are
    additional operations can be performed.

    • Add : 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 user defines an 'output' as a 'Property', property will be saved in the messagecontext for the future uses.