Creating Custom Transformers
Transformers in Mule are used to convert messages from one format to another or to manipulate the messages information such as headers and attachments. Mule ESB also provides several standard transformer, including XML transformers (such as XML to Object, XSLT, and DOM to XML), encryption transformer that encrypt and decrypt data, compression transformer that compresses and decompress data, and more. For a list of the standard transformation in Mule, see Using Transformer.
Since Mule 3 there are two ways to create a transformer.
Use a Transfomer Annotation on a method. This transformer will be automatically discovered and will be available to Mule’s automatic transformation engine. Transformers created this way are not usually referenced in your Mule configuration, instead it will be discovered based on the current type of message payload and the required type need (i.e. the parameter type of a component method parameter).
The [traditional Mule way of creating custom transformers by extending Abstract Transformer.