ref
Transformers Configuration Reference
Mule runtime engine version 3.8 reached its End of Life on November 16, 2021. For more information, contact your Customer Success Manager to determine how to migrate to the latest Mule version. |
This page provides details on configuring the standard transformers. Note that many transports and modules provide their own transformers as well.
Auto Transformer
A transformer that uses the transform discovery mechanism to convert the message payload. This transformer works much better when transforming custom object types rather than Java types, because there is less chance for ambiguity.
Attributes of <auto-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <auto-transformer…>
Custom Transformer
A user-implemented transformer.
Attributes of <custom-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
class |
An implementation of the Transformer interface. Type: class name |
Message Properties Transformer
A transformer that can add, delete or rename message properties.
Attributes of <message-properties-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
overwrite |
If Type: boolean |
scope |
Property scope to/from which properties are added/removed. The scope determines the lifespan of the properties. Default scope is outbound. Type: enumeration |
Child Elements of <message-properties-transformer…>
Name | Cardinality | Description |
---|---|---|
delete-message-property |
0..* |
Delete message properties matching a regular expression or wildcard. |
add-message-property |
0..* |
Add a message property. |
rename-message-property |
0..* |
Rename a message property. |
add-message-properties |
0..1 |
Add a set of message properties. |
Base64 Encoder Transformer
A transformer that base64 encodes a string or byte array message.
Attributes of <base64-encoder-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <base64-encoder-transformer…>
Base64 Decoder Transformer
A transformer that base64 decodes a message to give an array of bytes.
Attributes of <base64-decoder-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <base64-decoder-transformer…>
XML Entity Decoder Transformer
A transformer that decodes a string containing XML entities.
Attributes of <xml-entity-decoder-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <xml-entity-decoder-transformer…>
Gzip Compress Transformer
A transformer that compresses a byte array using gzip.
Attributes of <gzip-compress-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <gzip-compress-transformer…>
Gzip Uncompress Transformer
A transformer that uncompresses a byte array using gzip.
Attributes of <gzip-uncompress-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <gzip-uncompress-transformer…>
Byte Array to Hex String Transformer
A transformer that converts a byte array to a string of hexadecimal digits.
Attributes of <byte-array-to-hex-string-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <byte-array-to-hex-string-transformer…>
Hex String to Byte Array Transformer
A transformer that converts a string of hexadecimal digits to a byte array.
Attributes of <hex-string-to-byte-array-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <hex-string-to-byte-array-transformer…>
Byte Array to Object Transformer
A transformer that converts a byte array to an object (either deserializing or converting to a string).
Attributes of <byte-array-to-object-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <byte-array-to-object-transformer…>
Object to Byte Array Transformer
A transformer that serializes all objects except strings (which are converted using getBytes()).
Attributes of <object-to-byte-array-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <object-to-byte-array-transformer…>
Object to String Transformer
A transformer that gives a human-readable description of various types (useful for debugging).
Attributes of <object-to-string-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <object-to-string-transformer…>
Byte Array to Serializable Transformer
A transformer that converts a byte array to an object (deserializing the object).
Attributes of <byte-array-to-serializable-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <byte-array-to-serializable-transformer…>
Serializable to Byte Array Transformer
A transformer that converts an object to a byte array (serializing the object).
Attributes of <serializable-to-byte-array-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <serializable-to-byte-array-transformer…>
Byte Array to String Transformer
A transformer that converts a byte array to a string. Attributes of <byte-array-to-string-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <byte-array-to-string-transformer…>
String to Byte Array Transformer
A transformer that converts a string to a byte array.
Attributes of <string-to-byte-array-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
No Child Elements of <string-to-byte-array-transformer…>
Append String Transformer
A transformer that appends a string to a string payload.
Attributes of <append-string-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
message |
The string to append. Type: string |
No Child Elements of <append-string-transformer…>
Encrypt Transformer
A transformer that encrypts a message.
Attributes of <encrypt-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
strategy-ref |
The name of the encryption strategy to use. This should be configured using the password-encryption-strategy element, inside a security-manager element at the top level. Type: string |
No Child Elements of <encrypt-transformer…>
Decrypt Transformer
A transformer that decrypts a message.
Attributes of <decrypt-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If Type: boolean |
encoding |
String encoding used for transformer output. Type: string |
mimeType |
The MIME type, for example, Type: string |
strategy-ref |
The name of the encryption strategy to use. This should be configured using the password-encryption-strategy element, inside a security-manager element at the top level. Type: string |
No Child Elements of <decrypt-transformer…>
Expression Transformer
A transformer that evaluates one or more expressions on the current message. Each expression equates to a parameter in the return message. The return message for two or more expressions is an Object[].
Attributes of <expression-transformer…>
Name | Description |
---|---|
name |
Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level. Type: name (no spaces) |
returnClass |
The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Type: string |
ignoreBadInput |
Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If |
encoding |
String encoding used for transformer output. Type: boolean |
mimeType |
The MIME type, for example, Type: string |
returnSourceIfNull |
If all expressions return null on this transformer, this flag will cause the source payload to be returned without modification. Type: boolean |
evaluator |
The expression evaluator to use. Expression evaluators must be registered with the ExpressionEvaluatorManager before they can be used. Using the custom evaluator allows you to define your own evaluator with the 'custom-evaluator' attribute. Note that some evaluators such as xpath, groovy, and bean are loaded from other Mule modules (XML and Scripting, respectively). These modules must be on your classpath before the evaluator can be used. Type: standardExpressionEvaluators |
expression |
The expression to evaluate. The syntax of this attribute changes depending on the evaluator being used. Type: string |
custom-evaluator |
The name of the custom evaluator to use. This attribute is only used when the 'evaluator' attribute is set to "custom". You can plug in your own expression evaluators by registering them with the ExpressionEvaluatorManager. Type: name (no spaces) |