All docs This doc

Versions Compared


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

In addition to using the default message builders and formatters in WSO2 ESB, you can create your own custom message builders and formatters. 

Table of Contents

Custom message builder

Let's look at how to create a custom message 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 formatter to manipulate the outgoing payload from the ESB.