Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

Creating Custom Transformers

Transformers in Mule are used to convert messages from one format to another or to manipulate the message information such as headers and attachments. Mule also provides several standard transformers, including XML transformers (such as XML to Object, XSLT, and DOM to XML), encryption transformers that encrypt and decrypt data, compression transformers that compress and decompress data, and more. For a list of the standard transformers in Mule, see Using Transformers.

There are two ways to create a transformer.

  1. Use a Transformer Annotation on a method. This transformer is automatically discovered and is available to Mule’s automatic transformation engine. Transformers created this way are not usually referenced in your Mule configuration, instead it is discovered based on the current type of message payload and the required type need, that is, the parameter type of a component method parameter.

  2. The traditional Mule way of creating custom transformers by extending AbstractTransformer.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+