Hi, ESB is not handling the string response If the Content-Type is application/json. Apparently this is the fault on API response. Please find the wire log [1]. How can we handle this?
[1] - [2016-06-21 16:13:53,915] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "GET /devices/smoke_co_alarms/VhVmm7HOhEcL5sSzblcDOMMSoJ03t2br/co_alarm_state?auth=c.fRDyCBmlbBmwvpmODrw7qMIuJkbwZAtROf53kM9cwHDPEYdasapWaV284w4GnSohzgMuzJM8HEt9Bex3ommjCCoKaFuXFxAX9ZMyb5ckwNDpYWAMepcvbTtm37PRy3vFvARFYhWxOAgvFEEh HTTP/1.1[\r][\n]" [2016-06-21 16:13:53,915] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "Accept-Charset: UTF-8[\r][\n]" [2016-06-21 16:13:53,915] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "Content-Type: application/json[\r][\n]" [2016-06-21 16:13:53,915] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2[\r][\n]" [2016-06-21 16:13:53,915] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "Host: firebase-apiserver10-tah01-iad01.dapi.production.nest.com:9553[\r][\n]" [2016-06-21 16:13:53,916] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,915] DEBUG - wire << "Connection: Keep-Alive[\r][\n]" [2016-06-21 16:13:53,916] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,916] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2016-06-21 16:13:53,916] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:53,916] DEBUG - wire << "[\r][\n]" [2016-06-21 16:13:54,237] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,237] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]" [2016-06-21 16:13:54,237] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,237] DEBUG - wire >> "*Content-Type: application/json; charset=UTF-8*[\r][\n]" [2016-06-21 16:13:54,237] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,237] DEBUG - wire >> "Access-Control-Allow-Origin: *[\r][\n]" [2016-06-21 16:13:54,238] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,237] DEBUG - wire >> "Cache-Control: private, no-cache, max-age=0[\r][\n]" [2016-06-21 16:13:54,238] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,238] DEBUG - wire >> "Connection: close[\r][\n]" [2016-06-21 16:13:54,238] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,238] DEBUG - wire >> "Content-Length: 4[\r][\n]" [2016-06-21 16:13:54,238] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,238] DEBUG - wire >> "[\r][\n]" [2016-06-21 16:13:54,238] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,238] DEBUG - wire >> "*"ok"*" [2016-06-21 16:13:54,241] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,241] ERROR - JsonUtil #newJsonPayload. *Could not save JSON payload. Invalid input stream found.* MessageID: urn:uuid:84033421-f5c1-47a3-a3c7-9764c6cd087d [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,241] ERROR - DeferredMessageBuilder Error building message [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - org.apache.axis2.AxisFault: No JSON payload provided. [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:52) [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:138) [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133) [2016-06-21 16:13:54,242] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:178) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172) [2016-06-21 16:13:54,243] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.lang.Thread.run(Thread.java:745) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,243] ERROR - RelayUtils Error while building Passthrough stream [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - org.apache.axis2.AxisFault: No JSON payload provided. [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:52) [2016-06-21 16:13:54,244] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:138) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:178) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172) [2016-06-21 16:13:54,245] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.lang.Thread.run(Thread.java:745) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,244] ERROR - AnonymousListMediator Error while building message [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - org.apache.axis2.AxisFault: Error while building Passthrough stream [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142) [2016-06-21 16:13:54,246] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:178) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) [2016-06-21 16:13:54,247] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at java.lang.Thread.run(Thread.java:745) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - Caused by: org.apache.axis2.AxisFault: No JSON payload provided. [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:52) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:138) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133) [2016-06-21 16:13:54,248] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - ... 14 more [2016-06-21 16:13:54,249] INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - [2016-06-21 16:13:54,247] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:84033421-f5c1-47a3-a3c7-9764c6cd087d, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Error while building message, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ "><soapenv:Body/></soapenv:Envelope> Thank you -- Shakila Sivagnanarajah Software Engineer Mobile :+94 (0) 768 856837 shak...@wso2.com WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev