Configuring message formatters and message builders
Message formatters and Message builders are the components that allow us to send and receive different types of messages according to the content type specified in the request. It is important to enable the content type used in the messages exchanged because if the content type received is not configured in the system, the message will not be understood.
Message builders are used to process incoming messages, and Message formatters are used to build the outgoing messages.
We can enable the Message formatters and builders in the file located in <EI_HOME>/conf/axis2/axis2.xml. Message formatters are under the same name in XML tag, and so are Message builders. Most values that messages content type can be received are already configured, but they are commented. We just have to find the one we need and uncomment it for Message formatters and/or message builders, depending on the case.
For example, to enable us to send and receive JSON messages, we have to enable that content type for input and output messages in axis2.xml: