Re: [Dev] [EI] Getting empty cached response
Thanks Riyafa for the quick response. With this fix, it is working. Thanks, Keerthika. On Thu, Feb 1, 2018 at 12:23 PM, Riyafa Abdul Hameed wrote: > Hi, > > There has been a regression and the following PR fixes it. > https://github.com/wso2/carbon-mediation/pull/965 > > Thanks, > Riyafa > > On Thu, Feb 1, 2018 at 11:18 AM, Keerthika Mahendralingam < > keerth...@wso2.com> wrote: > >> Hi All, >> >> I have cloned the latest fix for cache mediator and tried with WSO2 EI >> 6.1.1-update19-SNAPSHOT. But I'm getting the correct response to the first >> call and an empty response to the subsequent request. What could be the >> reason? >> >> I'm using the following proxy: >> >> >> http://ws.apache.org/ns/synapse"; >>name="connectMockito" >>startOnLoad="true" >>statistics="disable" >>trace="disable" >>transports="http,https"> >> >> >> >> >> >> >> >>GET >> >>(1|2)[0-9][0-9] >>org.wso2.carbo >> n.mediator.cache.digest.HttpRequestHashGenerator >> >> >> >> >> >>http://demo2236300.mockable.io/testService >> "/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Log:* >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "GET /testService HTTP/1.1[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "Accept: */*[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "Content-Type: application/json[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "Host: demo2236300.mockable.io[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "Connection: Keep-Alive[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" >> >> [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 << "[\r][\n]" >> >> [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]" >> >> [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "cache-control: no-cache[\r][\n]" >> >> [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "access-control-allow-origin: *[\r][\n]" >> >> [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "Content-Type: application/json; charset=UTF-8[\r][\n]" >> >> [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed3252 >> 00[\r][\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "Date: Thu, 01 Feb 2018 05:44:45 GMT[\r][\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "Server: Google Frontend[\r][\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "Content-Length: 27[\r][\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "[\r][\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "{[\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> " "msg": "Hello Worldaa"[\n]" >> >> [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O >> dispatcher-1 >> "}" >> >> [2018-02-01 11:14:45,821] [EI-Core] INFO - LogMediator To: >> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: >> , MessageID: urn:uuid:933544bb-4a63-4d0b-9022-2fe03d54b6db, Direction: >> response, Envelope: > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>> oapenv:Body>Hello Worldaa> apenv:Body> >> >> [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "HTTP/1.1 200 OK[\r][\n]" >> >> [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "access-control-allow-origin: *[\r][\n]" >> >> [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed3252 >> 00[\r][\n]" >> >> [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "cacheKey: -27-21-649412412586-85-97-8340 >> -52-11-819416[\r][\n]" >> >> [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "cache-control: no-cache[\r][\n]" >> >> [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O >> dispatcher-1 << "Content-Type: application/json; charset=UTF-8[\r][\n]" >> >> [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener
Re: [Dev] [EI] Getting empty cached response
Hi, There has been a regression and the following PR fixes it. https://github.com/wso2/carbon-mediation/pull/965 Thanks, Riyafa On Thu, Feb 1, 2018 at 11:18 AM, Keerthika Mahendralingam < keerth...@wso2.com> wrote: > Hi All, > > I have cloned the latest fix for cache mediator and tried with WSO2 EI > 6.1.1-update19-SNAPSHOT. But I'm getting the correct response to the first > call and an empty response to the subsequent request. What could be the > reason? > > I'm using the following proxy: > > > http://ws.apache.org/ns/synapse"; >name="connectMockito" >startOnLoad="true" >statistics="disable" >trace="disable" >transports="http,https"> > > > > > > > >GET > >(1|2)[0-9][0-9] >org.wso2.carbon.mediator.cache.digest. > HttpRequestHashGenerator > > > > > >http://demo2236300.mockable.io/testService"/> > > > > > > > > > > > > > > > *Log:* > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "GET /testService HTTP/1.1[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "Accept: */*[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "Content-Type: application/json[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "Host: demo2236300.mockable.io[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "Connection: Keep-Alive[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" > > [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 << "[\r][\n]" > > [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]" > > [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "cache-control: no-cache[\r][\n]" > > [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "access-control-allow-origin: *[\r][\n]" > > [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "Content-Type: application/json; charset=UTF-8[\r][\n]" > > [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed3252 > 00[\r][\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "Date: Thu, 01 Feb 2018 05:44:45 GMT[\r][\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "Server: Google Frontend[\r][\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "Content-Length: 27[\r][\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "[\r][\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "{[\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> " "msg": "Hello Worldaa"[\n]" > > [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O > dispatcher-1 >> "}" > > [2018-02-01 11:14:45,821] [EI-Core] INFO - LogMediator To: > http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , > MessageID: urn:uuid:933544bb-4a63-4d0b-9022-2fe03d54b6db, Direction: > response, Envelope: xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>< > soapenv:Body>Hello Worldaa soapenv:Body> > > [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "HTTP/1.1 200 OK[\r][\n]" > > [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "access-control-allow-origin: *[\r][\n]" > > [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed3252 > 00[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "cacheKey: -27-21-649412412586-85-97- > 8340-52-11-819416[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "cache-control: no-cache[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "Content-Type: application/json; charset=UTF-8[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "Date: Thu, 01 Feb 2018 05:44:45 GMT[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]" > > [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O > dispatcher-1 << "[\r][\n]" > > [2018-0
[Dev] [EI] Getting empty cached response
Hi All, I have cloned the latest fix for cache mediator and tried with WSO2 EI 6.1.1-update19-SNAPSHOT. But I'm getting the correct response to the first call and an empty response to the subsequent request. What could be the reason? I'm using the following proxy: http://ws.apache.org/ns/synapse"; name="connectMockito" startOnLoad="true" statistics="disable" trace="disable" transports="http,https"> GET (1|2)[0-9][0-9] org.wso2.carbon.mediator.cache.digest.HttpRequestHashGenerator http://demo2236300.mockable.io/testService"/> *Log:* [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "GET /testService HTTP/1.1[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "Accept: */*[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "Content-Type: application/json[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "Host: demo2236300.mockable.io[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2018-02-01 11:14:45,069] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 << "[\r][\n]" [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]" [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "cache-control: no-cache[\r][\n]" [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "access-control-allow-origin: *[\r][\n]" [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "Content-Type: application/json; charset=UTF-8[\r][\n]" [2018-02-01 11:14:45,789] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed325200[\r][\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "Date: Thu, 01 Feb 2018 05:44:45 GMT[\r][\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "Server: Google Frontend[\r][\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "Content-Length: 27[\r][\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "[\r][\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "{[\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> " "msg": "Hello Worldaa"[\n]" [2018-02-01 11:14:45,790] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-1 >> "}" [2018-02-01 11:14:45,821] [EI-Core] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:933544bb-4a63-4d0b-9022-2fe03d54b6db, Direction: response, Envelope: http://schemas.xmlsoap.org/soap/envelope/";>Hello Worldaa [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 200 OK[\r][\n]" [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "access-control-allow-origin: *[\r][\n]" [2018-02-01 11:14:45,845] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed325200[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "cacheKey: -27-21-649412412586-85-97-8340-52-11-819416[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "cache-control: no-cache[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/json; charset=UTF-8[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Thu, 01 Feb 2018 05:44:45 GMT[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "17[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "{"msg":"Hello Worldaa"}[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]" [2018-02-01 11:14:45,846] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]" [2018-02-01 11:14:51,035] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-2 >> "GET /services/connectMockito HTTP/1.1[\r][\n]" [