|Content type||Message 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
XMLOutputFactory.properties 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.
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 WSO2 EI, you can specify the message relay builder (
org.wso2.carbon.relay.BinaryRelayBuilder) for that content type. For more information, see Configuring Message Relay.