Fuse Mediation Router has a built-in API that enables you to perform simple transformations on
incoming and outgoing messages. For example, the route shown in
Example 7.1 appends the text, World!, to the end of
the incoming message body.
Example 7.1. Simple transformation of messages
<from uri="SourceURL" /> <setBody> <language language="constant">World!</language> </setBody> <to uri="TargetURL" />
Where the setBody pattern replaces the content of the
incoming message's body based on an expression.
Fuse Mediation Router provides the patterns listed in Table 7.1 for doing simple, expression based, transformations.
Table 7.1. Simple transformation patterns
| Pattern | Description |
|---|---|
convertBodyTo | Converts the IN message body to the specified type. |
removeHeader | Adds a processor which removes the header on the IN message. |
removeHeaders | Adds a processor which removes headers, based on an expression, on the IN message. |
removeProperty | Adds a processor which removes the exchange property. |
setBody | Adds a processor which sets the body on the IN message. |
setFaultBody | Adds a processor which sets the body on the FAULT message. |
setHeader | Adds a processor which sets the header on the IN message. |
setOutHeader | Adds a processor which sets the header on the OUT message. |
setProperty | Adds a processor which sets the exchange property. |
transform | Adds a processor which sets the body on the OUT message. |








