title: Enabling JSON parsing in Axis2
body: <p>I have installed Apache Axis2 1.6.1 in a Jetty 8.0.4 web server, but JSON parsing does not seem to work, so I was wondering whether something more needs to be installed or configured in order for the receiving (service) side to understand JSON.</p>
  
  <p>More specifically, I use the <a href="http://axis.apache.org/axis2/java/core/docs/pojoguide.html" rel="nofollow">POJO Deployment</a> scenario for a simple service that I have developed and, while everything works as expected with SOAP requests, when I try to use JSON I keep getting the following exception:</p>
  
  <pre><code>org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '&lt;' at [row,col {unknown-source}]: [1,1]
  </code></pre>
  
  <p>This occurs consistently as a result of using any message sending method (e.g., sendReceive() or invokeRobust()), not only with my service, but even for the unit tests (e.g., JSONIntegrationTest) bundled with Axis2.</p>
  
  <p>Using packet tracing I can see that the outgoing message is correctly formatted in JSON ("application/json" content type), so, given the exception, obviously the receiving end fails to deserialize the message into the service expecting it. Apparently, Axis2 is waiting for XML even when it is receiving JSON.</p>
  
  <p>How do I tell Axis2 to deserialize JSON at the receiving (service) end?</p>