[
https://issues.apache.org/jira/browse/SYNAPSE-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15306365#comment-15306365
]
Hiranya Jayathilaka commented on SYNAPSE-1023:
----------------------------------------------
In yet another test case (also using APIs), I get the following error:
{noformat}
2016-05-30 00:46:01,707 [-] [PassThroughMessageProcessor-2] ERROR
PassThroughHttpSender Failed to submit the response
org.apache.axiom.om.DeferredParsingException:
javax.xml.stream.XMLStreamException: java.io.IOException: Stream closed
at
org.apache.axiom.om.impl.common.serializer.push.Serializer.serialize(Serializer.java:290)
at
org.apache.axiom.om.impl.common.AxiomSourcedElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomSourcedElementSupport$org_apache_axiom_om_impl_intf_AxiomSourcedElement$internalSerialize(AxiomSourcedElementSupport.aj:434)
at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:1)
at
org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:319)
at
org.apache.axiom.om.impl.llom.OMElementImpl.serializeAndConsume(OMElementImpl.java:1)
at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:142)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:553)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:310)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
at
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:154)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:275)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.rest.Resource.process(Resource.java:298)
at org.apache.synapse.rest.API.process(API.java:301)
{noformat}
This is likely because trying to serialize the same envelope twice -- once for
content length calculation, and once for actual response send.
> DISABLE_CHUNKING property is not honored in the response path of PT
> -------------------------------------------------------------------
>
> Key: SYNAPSE-1023
> URL: https://issues.apache.org/jira/browse/SYNAPSE-1023
> Project: Synapse
> Issue Type: Bug
> Components: Core, Transports
> Reporter: Vanjikumaran Sivajothy
> Assignee: Hiranya Jayathilaka
> Priority: Blocker
> Attachments: SYNAPSE-1023-updated.diff, SYNAPSE-1023.diff
>
>
> {code}
> <proxy name="StockQuoteProxy">
> <target>
> <inSequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:8080/RESTfulExample/rest/hello/data"/>
> </endpoint>
> </send>
> </inSequence>
> <outSequence>
> <property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
> <send/>
> </outSequence>
> </target>
> </proxy>
> {code}
>
> I have mentioned the disable chunking in response path and it is not honored,
> please check the curl request.
> {code}
> curl -v -XPOST -H "Content-type: application/json" -d '{"Hello": "World"}'
> 'http://localhost:8280/services/StockQuoteProxy'
> * Trying ::1...
> * Connected to localhost (::1) port 8280 (#0)
> > POST /services/StockQuoteProxy HTTP/1.1
> > Host: localhost:8280
> > User-Agent: curl/7.43.0
> > Accept: */*
> > Content-type: application/json
> > Content-Length: 18
> >
> * upload completely sent off: 18 out of 18 bytes
> < HTTP/1.1 201 Created
> < Server: Apache-Coyote/1.1
> < Date: Sat, 28 May 2016 22:54:29 GMT
> < Transfer-Encoding: chunked
> <
> * Connection #0 to host localhost left intact
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]