title: WSO2 ESB sample 440 fails (JSON/XML proxy)
body: <p>wso2esb-4.0.3</p>
  
  <p>I am able to execute other samples.  I do have ESB and StockService running.  Looks like the JSON transformation is happening, but that the jsonclient can't handle a JSON response.</p>
  
  <pre><code>ant jsonclient -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/services/JSONProxy
  </code></pre>
  
  <p>yields</p>
  
  <pre><code>[java] org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '&lt;'
   [java]  at [row,col {unknown-source}]: [1,1]
   [java]     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   [java]     at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)
   [java]     at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
   [java]     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
   [java]     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
   [java]     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
   [java]     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
   [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
   [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
   [java]     at samples.userguide.JSONClient.executeClient(Unknown Source)
   [java]     at samples.userguide.JSONClient.main(Unknown Source)
  </code></pre>
  
  <p>I'm not an Axis2 client expert.  Anyone have a work around to get this example working?</p>
  
  <p>Sending a curl with a JSON payload from the example also yields errors:</p>
  
  <pre><code>curl -X POST -H 'Content-type: application/json' -d '{"getQuote":{"request":{"symbol":"IBM"}}}' http://localhost:8280/services/JSONProxy
  </code></pre>
  
  <p>ESB console:</p>
  
  <pre><code>[2012-05-23 16:28:24,079]  INFO - LogMediator To: /services/JSONProxy, MessageID: urn:uuid:fa1489c7-e12e-4a59-8abb-663a35115cce, Direction: request, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;getQuote&gt;&lt;request&gt;&lt;symbol&gt;IBM&lt;/symbol&gt;&lt;/request&gt;&lt;/getQuote&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
  [2012-05-23 16:28:24,087]  WARN - ClientHandler Received an internal server error : Internal Server Error For : 127.0.0.1:9000 For Request : Axis2Request [Message ID : urn:uuid:ce8b27f3-5aea-461c-a1f5-e7d0c6bbac4d] [Status Completed : true] [Status SendingCompleted : true]
  [2012-05-23 16:28:24,089]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:ce8b27f3-5aea-461c-a1f5-e7d0c6bbac4d, Direction: response, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;faultstring&gt;com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
   at [row,col {unknown-source}]: [1,0]&lt;/faultstring&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
  </code></pre>