Apart from using the default message builders and formatters that are shipped with WSO2 ESB, you have the flexibility to use your own custom message builder and formatter.
Table of Contents |
---|
Custom
...
Message Builder
Let's look at how to create a custom builder using a sample scenario where you need to Base64 encode an XML entry field. In this sample, you retrieve the text content from the payload and then Base64 encode the text. This is then converted to SOAP and the content is then processed in the ESB mediation flow.
...
Code Block | ||
---|---|---|
| ||
<messageBuilder contentType="text/xml" class="org.apache.axis2.transport.http.CustomBuilderForTextXml"/> |
Custom
...
Message Formatter
Similarly you can write your own Message Formatters as well, in order to manipulate the outgoing payload from ESB.
...