WSO2 ESB示例440失败(JSON/XML代理)

WSO2 ESB示例440失败(JSON/XML代理),wso2,wso2esb,Wso2,Wso2esb,wso2esb-4.0.3 我能够执行其他样本。我确实运行了ESB和StockService。看起来JSON转换正在进行,但jsonclient无法处理JSON响应 ant jsonclient -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/services/JSONProxy 屈服 [java] org.apache.axis2.AxisFault:

wso2esb-4.0.3

我能够执行其他样本。我确实运行了ESB和StockService。看起来JSON转换正在进行,但jsonclient无法处理JSON响应

ant jsonclient -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/services/JSONProxy
屈服

[java] org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
 [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)
ESB控制台:

[2012-05-23 16:28:24,079]  INFO - LogMediator To: /services/JSONProxy, MessageID: urn:uuid:fa1489c7-e12e-4a59-8abb-663a35115cce, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><getQuote><request><symbol>IBM</symbol></request></getQuote></soapenv:Body></soapenv:Envelope>
[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: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><faultstring>com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]</faultstring></soapenv:Body></soapenv:Envelope>
[2012-05-23 16:28:24079]信息-LogMediator To:/services/JSONProxy,MessageID:urn:uuid:fa1489c7-e12e-4a59-8abb-663a35115cce,方向:请求,信封:IBM
[2012-05-23 16:28:24087]警告-ClientHandler收到内部服务器错误:请求的127.0.0.1:9000的内部服务器错误:Axis2Request[消息ID:urn:uuid:ce8b27f3-5aea-461c-a1f5-e7d0c6bbac4d][状态已完成:true][状态发送已完成:true]
[2012-05-23 16:28:24089]信息-日志调解人收件人:http://www.w3.org/2005/08/addressing/anonymous,WSAction:,SOAPAction:,MessageID:urn:uuid:ce8b27f3-5aea-461c-a1f5-e7d0c6bbac4d,方向:响应,信封:com.ctc.wstx.exc.WstxEOFException:prolog中的意外EOF
在[row,col{unknown source}]:[1,0]

将消息从json转换为soap11时,请确保将端点格式设置为soap11。您可以通过如下方式设置端点地址来实现:在synapse配置中设置

[2012-05-23 16:28:24,079]  INFO - LogMediator To: /services/JSONProxy, MessageID: urn:uuid:fa1489c7-e12e-4a59-8abb-663a35115cce, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><getQuote><request><symbol>IBM</symbol></request></getQuote></soapenv:Body></soapenv:Envelope>
[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: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><faultstring>com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]</faultstring></soapenv:Body></soapenv:Envelope>