Access Keys:
Skip to content (Access Key - 0)

Contents

Transformers Configuration Reference

[ Transformer ] [ Auto Transformer ] [ Custom Transformer ] [ Message Properties Transformer ] [ No Action Transformer ] [ Base64 Encoder Transformer ] [ Base64 Decoder Transformer ] [ Xml Entity Encoder Transformer ] [ Xml Entity Decoder Transformer ] [ Gzip Compress Transformer ] [ Gzip Uncompress Transformer ] [ Byte Array To Hex String Transformer ] [ Hex String To Byte Array Transformer ] [ Byte Array To Object Transformer ] [ Object To Byte Array Transformer ] [ Object To String Transformer ] [ Object To Xml Transformer ] [ Byte Array To Serializable Transformer ] [ Serializable To Byte Array Transformer ] [ Byte Array To String Transformer ] [ String To Byte Array Transformer ] [ Append String Transformer ] [ Encrypt Transformer ] [ Decrypt Transformer ] [ Expression Transformer ] [ Xpath Extractor Transformer ]

This page provides details on configuring the standard transformers. Note that many transports and modules provide their own transformers as well.

Transformer A reference to a transformer defined elsewhere.

Attributes of <transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
ref string no   The name of the transformer to use.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Custom Transformer A user-implemented transformer.

Attributes of <custom-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
class class name no   An implementation of the Transformer interface.

Child Elements of <custom-transformer...>

Name Cardinality Description
spring:property 0..* Spring-style property element for custom configuration.

Message Properties Transformer A transformer that can add or delete message properties.

Attributes of <message-properties-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
overwrite boolean no true If false, a property is not added if the message already contains a property with that name.
scope invocation/outbound/session/application no   Property scope to/from which properties are added/removed. The scope determines the lifespan of the properties.

Child Elements of <message-properties-transformer...>

Name Cardinality Description
delete-message-property 0..* Delete message properties matching a regular expression.
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.

No Action Transformer A transformer that has no effect.

Attributes of <no-action-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Base64 Encoder Transformer A transformer that base64 encodes a string or byte array message.

Attributes of <base64-encoder-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Base64 Decoder Transformer A transformer that base64 decodes a message to give an array of bytes.

Attributes of <base64-decoder-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Xml Entity Encoder Transformer A transformer that encodes a string using XML entities.

Attributes of <xml-entity-encoder-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Xml Entity Decoder Transformer A transformer that decodes a string containing XML entities.

Attributes of <xml-entity-decoder-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Gzip Compress Transformer A transformer that compresses a byte array using gzip.

Attributes of <gzip-compress-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Gzip Uncompress Transformer A transformer that uncompresses a byte array using gzip.

Attributes of <gzip-uncompress-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Object To Xml Transformer Converts a Java object to an XML representation using XStream.

Attributes of <object-to-xml-transformer...>

Name Type Required Default Description
acceptMuleMessage boolean no false Whether the transformer will serialize the payload or the entire MuleMessage including not only its payload, but also its properties, correlation ID, etc.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

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 Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Byte Array To String Transformer A transformer that converts a byte array to a string.

Attributes of <byte-array-to-string-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

String To Byte Array Transformer A transformer that converts a string to a byte array.

Attributes of <string-to-byte-array-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Append String Transformer A transformer that appends a string to a string payload.

Attributes of <append-string-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
message string no   The string to append.

Encrypt Transformer A transformer that encrypts a message.

Attributes of <encrypt-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
strategy-ref string no   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.

Decrypt Transformer A transformer that decrypts a message.

Attributes of <decrypt-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
strategy-ref string no   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.

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 will be an Object[].

Attributes of <expression-transformer...>

Name Type Required Default Description
name name (no spaces) no   Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.
returnClass string no   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 a an Orange[], you set the return class to 'org.mule.tck.testmodels.fruit.Orange[]'.
ignoreBadInput boolean no   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 true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.
returnSourceIfNull boolean no   If all expressions return null on this transformer, this flag will cause the source payload to be returned without modification.

Child Elements of <expression-transformer...>

Name Cardinality Description
return-argument 0..1 A list of expressions, each of which is evaluated and equates to an element in the result message. If just one 'return-argument' is configured, the result will be the evaluation of that expression rather than an object array.

Xpath Extractor Transformer The XPathExtractor is a simple transformer that evaluates an XPath expression using the JAXP libraries against the given bean and returns the result. By default, a String of the result will be returned. To return a Node, NodeSet, Boolean or Number result, the resultType attribute can be set.

Attributes of <xpath-extractor-transformer...>

Name Type Required Default Description
expression string no   The XPath expression.
resultType xpathResultType no   The XPath result type (e.g. STRING or NODE).

Child Elements of <xpath-extractor-transformer...>

Name Cardinality Description
namespace 0..* A namespace declaration, expressed as prefix and uri attributes. The prefix can then be used inside the expression.
Adaptavist Theme Builder Powered by Atlassian Confluence