This documentation is for WSO2 Enterprise Integrator version 6.2.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Content typeMessage Builder













Handling illegal XML characters in plain text payloads


To use this feature in the current version of WSO2 EI, you need to get the latest product updates for your product. This feature is available as a product update from 2018-09-14 onwards. Note that you can deploy updates in a production environment only if you have a valid subscription with WSO2. Read more about WSO2 Updates

Plain text payloads that contain illegal XML characters (such as unicodes) will not be successfully processed by the ESB. Therefore, you must configure the system to replace the illegal characters in the payload with an actual character. To enable this configuration, add the parameter shown below (with a suitable unicode value) to the file (stored in the <EI_HOME>/ directory). If this file does not exist in your product by default, be sure to create a new file. 

When this configuration is enabled, all the illegal characters found in a payload will be replaced with the actual character that is represented by the unicode value that you specify for the parameter. The below example uses whitespaces (represented by by the '\u0020' unicode value) to replace illegal characters in payloads.

Code Block

Using message relay

If you want to enable message relay, so that messages of a specific content type are not built or formatted but simply pass through the ESB, you can specify the message relay builder (org.wso2.carbon.relay.BinaryRelayBuilder) for that content type. For more information, see Configuring Message Relay.


  • In the parameters section: <parameter name="defaultContentType" locked="false">">emptyempty/content<content"</parameter>
  • In the message builders section: <messageBuilder contentType="empty/content" class="org.wso2.carbon.relay.BinaryRelayBuilder"/> 
  • In the message formatters section: <messageFormatter contentType="empty/content" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>