Posts

Showing posts from October, 2013

The difference between JSON streaming builder and the default JSON builder in WSO2 ESB

When a request/response is received by ESB, the message will initially be converted into XML infoset. This process is known as message building and the builders are responsible to do this transformation based on the HTTP Content-Type of the incoming message. The default JSONBuilder (org.apache.axis2.json.JSONBuilder) converts the JSON into corresponding XML representation. If I explain this through an example, suppose your incoming JSON response/request is similar to the following. {   "getQuote": {     "request": { "symbol": "charitha" }   } } If you log this message inside inSequence of your message flow (using log mediator), you will observe an output similar to the following. LogMediator To: http://www.w3.org/2005/08/addressing/anonymous,  WSAction: , SOAPAction: , MessageID: urn:uuid:f37b8466-7cb3-41d6-9187-b5a0a7648f16,  Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Enve