Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Synapse config
I have created a simple proxy and NO_KEEPALIVE to dishonor the keep-alive connection in response path.
<definitions xmlns="http://ws.apache.org/ns/synapse"> <proxy name="StockQuoteProxy"> <target> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> <outSequence> <property name="NO_KEEPALIVE" value="true" scope="axis2"/> <send/> </outSequence> </target> <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> </proxy> </definitions>
Invoke the proxy service with keep-alive connection via curl as mentioned below
CURL Command
curl -v -H "Keep-Alive: 60" -H "Connection: keep-alive" --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn:getQuote" --data '<?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:aff28543-56ba-4aef-982a-f74a685d777d</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
Since I have mentioned NO_KEEPALIVE in the response path, I expect synapse to behave same as request path with NO_KEEPALIVE property,
However it is not honored in the response received
Request and Response
* 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: */* > Keep-Alive: 60 > Connection: keep-alive > 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: Wed, 01 Jun 2016 22:23:05 GMT < Server: Synapse-PT-HttpComponents-NIO < Transfer-Encoding: chunked < Connection: keep-alive < * 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:aff28543-56ba-4aef-982a-f74a685d777d</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>4.04663880583828</ax21:change><ax21:earnings>13.950904640756914</ax21:earnings><ax21:high>68.15602355709272</ax21:high><ax21:last>65.6361659744428</ax21:last><ax21:lastTradeTimestamp>Wed Jun 01 15:23:05 PDT 2016</ax21:lastTradeTimestamp><ax21:low>-65.21358674919206</ax21:low><ax21:marketCap>5.733522132541257E7</ax21:marketCap><ax21:name>IBM Company</ax21:name><ax21:open>67.94986444057913</ax21:open><ax21:peRatio>-18.141038233742336</ax21:peRatio><ax21:percentageChange>-6.479310294897818</ax21:percentageChange><ax21:prevClose>-62.45477715467396</ax21:prevClose><ax21:symbol>IBM</ax21:symbol><ax21:volume>15986</ax21:volume></ns:return></ns:getQuoteResponse></soapenv:Body></soapenv:Envelope>LM-SFA-00871979:axis2Client vsivajothy$