Hi All, I am checking Zuora connector with ESB 5.0.0 - BETA.I am getting error [1] when the API response with 403 comes with no body.But this works fine with ESB -4.9.0 [2]. Is this an expected behavior?
[1] [2016-06-07 11:43:43,212] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "DELETE /rest/v1/payment-methods/ HTTP/1.1[\r][\n]" [2016-06-07 11:43:43,213] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Authorization: Basic aXXXXXXXXXXXXXXXXXXX==[\r][\n]" [2016-06-07 11:43:43,213] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" [2016-06-07 11:43:43,214] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Action: urn:deletePayments[\r][\n]" [2016-06-07 11:43:43,214] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Accept: */*[\r][\n]" [2016-06-07 11:43:43,214] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Cache-Control: no-cache[\r][\n]" [2016-06-07 11:43:43,215] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Postman-Token: b618abc9-99ca-9540-3332-b6302bb01e10[\r][\n]" [2016-06-07 11:43:43,215] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Accept-Encoding: gzip, deflate[\r][\n]" [2016-06-07 11:43:43,215] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Accept-Language: en-US,en;q=0.8[\r][\n]" [2016-06-07 11:43:43,215] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Content-Type: application/json[\r][\n]" [2016-06-07 11:43:43,215] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Host: apisandbox-api.zuora.com[\r][\n]" [2016-06-07 11:43:43,216] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]" [2016-06-07 11:43:43,216] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2016-06-07 11:43:43,216] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "[\r][\n]" [2016-06-07 11:43:43,639] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "HTTP/1.1 403 Forbidden[\r][\n]" [2016-06-07 11:43:43,640] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Server: Zuora App[\r][\n]" [2016-06-07 11:43:43,640] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Access-Control-Allow-Credentials: true[\r][\n]" [2016-06-07 11:43:43,641] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Access-Control-Allow-Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" [2016-06-07 11:43:43,641] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Content-Length: 0[\r][\n]" [2016-06-07 11:43:43,641] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Expires: Tue, 07 Jun 2016 06:13:43 GMT[\r][\n]" [2016-06-07 11:43:43,641] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Cache-Control: max-age=0, no-cache, no-store[\r][\n]" [2016-06-07 11:43:43,642] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Pragma: no-cache[\r][\n]" [2016-06-07 11:43:43,642] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Date: Tue, 07 Jun 2016 06:13:43 GMT[\r][\n]" [2016-06-07 11:43:43,642] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Connection: keep-alive[\r][\n]" [2016-06-07 11:43:43,643] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]" [2016-06-07 11:43:43,663] ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID: urn:uuid:7cf1bb4f-1227-428f-ad6d-1899babf0b15 [2016-06-07 11:43:43,666] ERROR - PassThroughHttpSender Failed to submit the response org.apache.axis2.AxisFault: Payload could not be written as JSON. at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:260) at org.apache.synapse.commons.json.JsonStreamFormatter.writeTo(JsonStreamFormatter.java:61) at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:555) at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:264) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212) at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:35) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:87) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:292) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:774) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:546) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:179) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:255) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [2016-06-07 11:43:43,670] ERROR - Axis2Sender Access-Control-Allow-Credentials:true,Access-Control-Allow-Origin:chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop,Cache-Control:max-age=0, no-cache, no-store,Expires:Tue, 07 Jun 2016 06:13:43 GMT,Pragma:no-cache,<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> Unexpected error sending message back org.apache.axis2.AxisFault: Failed to submit the response at org.apache.synapse.transport.passthru.PassThroughHttpSender.handleException(PassThroughHttpSender.java:613) at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:266) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212) at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:35) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:87) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:292) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:774) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:546) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:179) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:255) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.axis2.AxisFault: Payload could not be written as JSON. at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:260) at org.apache.synapse.commons.json.JsonStreamFormatter.writeTo(JsonStreamFormatter.java:61) at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:555) at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:264) ... 15 more [2016-06-07 11:43:43,675] INFO - LogMediator To: , WSAction: , SOAPAction: , MessageID: urn:uuid:7cf1bb4f-1227-428f-ad6d-1899babf0b15, Direction: response, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Access-Control-Allow-Credentials:true,Access-Control-Allow-Origin:chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop,Cache-Control:max-age=0, no-cache, no-store,Expires:Tue, 07 Jun 2016 06:13:43 GMT,Pragma:no-cache,<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> Unexpected error sending message back, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ "><soapenv:Body/></soapenv:Envelope> [2] - [2016-06-07 12:14:23,546] DEBUG - wire << "DELETE /rest/v1/payment-methods/ HTTP/1.1[\r][\n]" [2016-06-07 12:14:23,546] DEBUG - wire << "Authorization: Basic aXXXXXXXXXXXXXXXXXXX==[\r][\n]" [2016-06-07 12:14:23,546] DEBUG - wire << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" [2016-06-07 12:14:23,547] DEBUG - wire << "Action: urn:deletePayments[\r][\n]" [2016-06-07 12:14:23,547] DEBUG - wire << "Accept: */*[\r][\n]" [2016-06-07 12:14:23,547] DEBUG - wire << "Cache-Control: no-cache[\r][\n]" [2016-06-07 12:14:23,547] DEBUG - wire << "Postman-Token: c668264d-75b9-fd31-6786-3763ce503d87[\r][\n]" [2016-06-07 12:14:23,547] DEBUG - wire << "Accept-Encoding: gzip, deflate[\r][\n]" [2016-06-07 12:14:23,548] DEBUG - wire << "Accept-Language: en-US,en;q=0.8[\r][\n]" [2016-06-07 12:14:23,548] DEBUG - wire << "Content-Type: application/json[\r][\n]" [2016-06-07 12:14:23,548] DEBUG - wire << "Host: apisandbox-api.zuora.com:443[\r][\n]" [2016-06-07 12:14:23,548] DEBUG - wire << "Connection: Keep-Alive[\r][\n]" [2016-06-07 12:14:23,548] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2016-06-07 12:14:23,549] DEBUG - wire << "[\r][\n]" [2016-06-07 12:14:24,543] DEBUG - wire >> "HTTP/1.1 403 Forbidden[\r][\n]" [2016-06-07 12:14:24,544] DEBUG - wire >> "Server: Zuora App[\r][\n]" [2016-06-07 12:14:24,544] DEBUG - wire >> "Access-Control-Allow-Credentials: true[\r][\n]" [2016-06-07 12:14:24,544] DEBUG - wire >> "Access-Control-Allow-Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" [2016-06-07 12:14:24,545] DEBUG - wire >> "Content-Length: 0[\r][\n]" [2016-06-07 12:14:24,545] DEBUG - wire >> "Expires: Tue, 07 Jun 2016 06:44:24 GMT[\r][\n]" [2016-06-07 12:14:24,545] DEBUG - wire >> "Cache-Control: max-age=0, no-cache, no-store[\r][\n]" [2016-06-07 12:14:24,545] DEBUG - wire >> "Pragma: no-cache[\r][\n]" [2016-06-07 12:14:24,546] DEBUG - wire >> "Date: Tue, 07 Jun 2016 06:44:24 GMT[\r][\n]" [2016-06-07 12:14:24,546] DEBUG - wire >> "Connection: keep-alive[\r][\n]" [2016-06-07 12:14:24,546] DEBUG - wire >> "[\r][\n]" [2016-06-07 12:14:24,570] DEBUG - wire << "HTTP/1.1 403 Forbidden[\r][\n]" [2016-06-07 12:14:24,570] DEBUG - wire << "Cache-Control: max-age=0, no-cache, no-store[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Access-Control-Allow-Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Access-Control-Allow-Credentials: true[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Expires: Tue, 07 Jun 2016 06:44:24 GMT[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Pragma: no-cache[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Date: Tue, 07 Jun 2016 06:44:24 GMT[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]" [2016-06-07 12:14:24,571] DEBUG - wire << "Connection: keep-alive[\r][\n]" [2016-06-07 12:14:24,572] DEBUG - wire << "[\r][\n]" [2016-06-07 12:14:24,572] DEBUG - wire << "0[\r][\n]" [2016-06-07 12:14:24,572] DEBUG - wire << "[\r][\n]" Thanks Kesavan Yogarajah Software Engineer Mobile :+94 (0) 779 758021 [email protected] WSO2, Inc. lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
