synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vanjikumaran Sivajothy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SYNAPSE-1023) DISABLE_CHUNKING property is not honored in the response path of PT
Date Sun, 29 May 2016 07:11:12 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15305796#comment-15305796
] 

Vanjikumaran Sivajothy commented on SYNAPSE-1023:
-------------------------------------------------

I have create the patch and tested with the proxy given below,
{code}
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy name="StockQuoteProxy">
        <target>
            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
            <outSequence>
                <property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
</definitions>
{code}

Incvoked via curl and
{code}
curl -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn:getQuote"
-XPOST -d '<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:MessageID>urn:uuid:66cda4ab-7881-4eea-a3cc-61e277454a1f</wsa:MessageID><wsa:Action>urn:getQuote</wsa:Action></soapenv:Header><soapenv:Body><m0:getQuote
xmlns:m0="http://services.samples"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote></soapenv:Body></soapenv:Envelope>'
 http://localhost:8280/services/StockQuoteProxy
{code}

Observer Transfer-Encoding: chunked is not in the reponse path

{code}
LM-SFA-00871979:axis2Client vsivajothy$ curl -v --header "Content-Type: text/xml;charset=UTF-8"
--header "SOAPAction:urn:getQuote" -XPOST -d '<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:MessageID>urn:uuid:66cda4ab-7881-4eea-a3cc-61e277454a1f</wsa:MessageID><wsa:Action>urn:getQuote</wsa:Action></soapenv:Header><soapenv:Body><m0:getQuote
xmlns:m0="http://services.samples"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote></soapenv:Body></soapenv:Envelope>'
 http://localhost:8281/services/StockQuoteProxy
*   Trying ::1...
* Connected to localhost (::1) port 8281 (#0)
> POST /services/StockQuoteProxy HTTP/1.1
> Host: localhost:8281
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: text/xml;charset=UTF-8
> SOAPAction:urn:getQuote
> Content-Length: 470
> 
* upload completely sent off: 470 out of 470 bytes
< HTTP/1.1 200 OK
< Content-Type: text/xml; charset=UTF-8
< Date: Sun, 29 May 2016 07:04:29 GMT
< Server: Synapse-PT-HttpComponents-NIO
< Content-Length: 1238
< 
* Connection #0 to host localhost left intact
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>urn:getQuoteResponse</wsa:Action><wsa:RelatesTo>urn:uuid:66cda4ab-7881-4eea-a3cc-61e277454a1f</wsa:RelatesTo></soapenv:Header><soapenv:Body><ns:getQuoteResponse
xmlns:ns="http://services.samples"><ns:return xmlns:ax21="http://services.samples/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse"><ax21:change>-2.6828974929642486</ax21:change><ax21:earnings>-8.753834648591738</ax21:earnings><ax21:high>178.058486970131</ax21:high><ax21:last>171.83930648253593</ax21:last><ax21:lastTradeTimestamp>Sun
May 29 00:04:29 PDT 2016</ax21:lastTradeTimestamp><ax21:low>-171.17417221912933</ax21:low><ax21:marketCap>4.467990253866357E7</ax21:marketCap><ax21:name>IBM
Company</ax21:name><ax21:open>179.12353489821118</ax21:open><ax21:peRatio>-17.18789161961029</ax21:peRatio><ax21:percentageChange>-1.362853752620967</ax21:percentageChange><ax21:prevClose>196.8587963165266</ax21:prevClose><ax21:symbol>IBM</ax21:symbol><ax21:volume>9217</ax21:volume></ns:return></ns:getQuoteResponse></soapenv:Body></soapenv:Envelope>LM-SFA-00871979:axis2Client
vsivajothy$ 
{code}

Without disabled chunked configuration, server worked in default manner.

{code}
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy name="StockQuoteProxy">
        <target>
            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
            <outSequence>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
</definitions>
{code}

 {code}
 * upload completely sent off: 470 out of 470 bytes
< HTTP/1.1 200 OK
< Content-Type: text/xml; charset=UTF-8
< Date: Sun, 29 May 2016 07:08:05 GMT
< Server: Synapse-PT-HttpComponents-NIO
< Transfer-Encoding: chunked
 {code}


Thanks,
vanji

> 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: Critical
>         Attachments: 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message