WSO2 ESB - Enrich Mediator

Enrich Mediator

Enrich Mediator can process a message based on a given source configuration and then perform the specified action on the message by using the target configuration. It basically gets an OMElement using the configuration specified in the source and then modify the message by putting it on the current message using the configuration in the target.

Syntax

 <enrich>
       <source [clone=true|false] [type=custom|envelope|body|property|inline] xpath="" property="" />
       <target [action=replace|child|sibiling] [type=custom|envelope|body|property|inline] xpath="" property="" />
 </enrich>

UI Configuration

Enrich Mediator Screenshot

You have the following configuration under the Enrich mediator.

Example

 <enrich> xmlns="http://ws.apache.org/ns/synapse"
           <source clone="false" type="envelope" xpath="" property="" />
           <target action="replace" type="body" xpath="" property="" />
 </enrich>

In this example we are setting the property symbol and later we are logging it using the log mediator.