This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.

Versions Compared


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


Code Block
{"foo.root":{"data":"my json string"}}

JSON support implementation is a new feature in Apache Axis2/Java. It will become a crucial improvement in the future with applications like Javascript Web services.

Learn more information about JSON here.

Configuring WSO2 ESB for Supporting JSON

Open up is a lightweight data-interchange format. It can be used as an alternative to XML or SOAP. To enable the JSON support in Synapse, the following two JAR files should be deployed into the lib directory of Synapse.

Having deployed the necessary libraries, you should now register the JSON message builder and formatter with Synapse. Open up repository/conf/axis2.xml file of Synapse and add the following two entries under the messageBuilders and messageFormatters sections respectively.

Code Block
<messageBuilder contentType="application/json"

<messageFormatter contentType="application/json"

Add the above two entries to the samples/axis2Client/client_repo/conf/axis2.xml file.