Hi,
can you upload your axis.xml file also becasue its seems to be like a
problem in message builder/formatter.

On Thu, Oct 8, 2015 at 2:18 PM, Malaka Silva <[email protected]> wrote:

> Hi,
>
> Can you please share the wire logs.
>
> On Thu, Oct 8, 2015 at 1:00 PM, Jay <[email protected]> wrote:
>
>> Hi All,
>>
>> When i developing ESB connector for Microsoft PowerBI there is a  method
>> which returning empty response with the Content-Type:
>> application/octet-stream. And it is throwing following exception. I have
>> tried with following message formatters/builders and none of them are
>> working properly and giving the same exception.
>> <messageBuilder contentType="application/octet-stream"
>>                        class="org.apache.axis2.format.BinaryBuilder"/>
>> <messageFormatter contentType="application/octet-stream"
>>                         class="org.apache.axis2.format.BinaryFormatter"/>
>>
>> <messageBuilder contentType="application/octet-stream"
>>                        class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>> <messageFormatter contentType="application/octet-stream"
>>
>> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>>
>> --- Synapse configuration -----
>>
>> <template name="addRows" xmlns="http://ws.apache.org/ns/synapse";>
>>    <parameter name="datasetId" description="Guid of the Dataset to use."
>> />
>>    <parameter name="tableName" description="Name of Table in the Dataset."
>> />
>>    <parameter name="rows" description="Array of JSON objects which
>> contains
>> column name and column value as row data." />
>>    <sequence>
>>       <property name="uri.var.datasetId" expression="$func:datasetId" />
>>       <property name="uri.var.tableName" expression="$func:tableName" />
>>       <property name="uri.var.rows" expression="$func:rows" />
>>       <payloadFactory media-type="json">
>>          <format>
>>             {
>>             "rows":$1
>>             }
>>          </format>
>>          <args>
>>             <arg expression="get-property('uri.var.rows')" />
>>          </args>
>>       </payloadFactory>
>>       <call>
>>          <endpoint>
>>             <http method="post"
>>
>> uri-template="{+uri.var.apiUrl}/datasets/{+uri.var.datasetId}/tables/{+uri.var.tableName}/rows"
>> />
>>          </endpoint>
>>       </call>
>>       <property name="messageType" value="application/json" scope="axis2"
>> />
>>
>>       <header name="X-Frame-Options" action="remove" scope="transport" />
>>       <header name="Strict-Transport-Security" action="remove"
>> scope="transport" />
>>       <header name="RequestId" action="remove" scope="transport" />
>>       <header name="X-Content-Type-Options" action="remove"
>> scope="transport" />
>>       <header name="OData-Version" action="remove" scope="transport" />
>>       <header name="Connection" action="remove" scope="transport" />
>>    </sequence>
>> </template>
>>
>> ---- Wire log ----
>>
>> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << HTTP/1.1 200
>> OK
>> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 <<
>> Cache-Control:
>> no-store, must-revalidate, no-cache
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
>> Content-Length:
>> 0
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 << Content-Type:
>> application/octet-stream
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
>> Content-Encoding: gzip
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 << Server:
>> Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
>> Strict-Transport-Security: max-age=31536000; includeSubDoma
>> ins
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
>> X-Frame-Options: deny
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 <<
>> X-Content-Type-Options: nosniff
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << RequestId:
>> bdd8f6ca-fc26-43d3-8943-2e3a08b276e1
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << Date: Thu, 08
>> Oct 2015 07:59:40 GMT
>> [2015-10-08 13:29:41,532] ERROR - RelayUtils Error while building
>> Passthrough stream
>> java.io.EOFException
>>         at
>> java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
>>         at
>> java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
>>         at
>> java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
>>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
>>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
>>         at
>>
>> org.apache.axis2.transport.http.HTTPTransportUtils.handleGZip(HTTPTransportUtils.java:257)
>>         at
>>
>> org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:95)
>>
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
>>         at
>>
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
>>         at
>>
>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
>>         at
>>
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
>>         at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
>> nt.java:655)
>>         at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
>>         at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:500)
>>         at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
>>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>         at
>>
>> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:243)
>>         at
>>
>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>         at
>>
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>         at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>         at java.lang.Thread.run(Thread.java:744)
>> [2015-10-08 13:29:41,536] ERROR - TemplateMediator Error while building
>> message
>> org.apache.axis2.AxisFault: Error while building Passthrough stream
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142)
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
>>         at
>>
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
>>         at
>>
>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
>>         at
>>
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
>>         at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
>> nt.java:655)
>>         at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
>>         at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:500)
>>         at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
>>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>         at
>>
>> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:243)
>>         at
>>
>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>         at
>>
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>         at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>         at java.lang.Thread.run(Thread.java:744)
>> Caused by: java.io.EOFException
>>         at
>> java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
>>         at
>> java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
>>         at
>> java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
>>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
>>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
>>         at
>>
>> org.apache.axis2.transport.http.HTTPTransportUtils.handleGZip(HTTPTransportUtils.java:257)
>>         at
>>
>> org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:95)
>>
>>         at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
>>         ... 14 more
>> [2015-10-08 13:29:41,540]  INFO - LogMediator To:
>> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction
>> : , MessageID: urn:uuid:8896e5be-893a-444d-9379-28d7f72e1756, Direction:
>> request, MESSAGE = Executing default 'fault' se
>> quence, ERROR_CODE = 0, ERROR_MESSAGE = Error while building message,
>> Envelope: <?xml version='1.0' encoding='utf-8'?><s
>> oapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>> "><soapenv:Body/></soapenv:Envelope>
>> [2015-10-08 13:32:38,979]  WARN - SourceHandler Connection time out after
>> request is read: http-incoming-3
>>
>> Can someone please help me here?
>>
>> Thanks,
>> Janaka Ranathunga
>>
>>
>>
>> --
>> View this message in context:
>> http://wso2-oxygen-tank.10903.n7.nabble.com/DEV-ESB-Connector-Issue-with-empty-response-tp126711.html
>> Sent from the WSO2 Development mailing list archive at Nabble.com.
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Tech Lead
> M: +94 777 219 791
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
> http://www.wso2.com/about/team/malaka-silva/
> <http://wso2.com/about/team/malaka-silva/>
>
> Save a tree -Conserve nature & Save the world for your future. Print this
> email only if it is absolutely necessary.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thank you
Best Regards

*Rajjaz HM*
Associate Software Engineer
WSO2 Inc. <http://wso2.com/>
lean | enterprise | middleware
Mobile | +94752833834
Email   | [email protected]
LinkedIn | Blogger | WSO2 Profile
<http://wso2.com/about/team/mohammer_rajjaz/>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to