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 <
[email protected]> 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:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <proxy xmlns="http://ws.apache.org/ns/synapse";
>        name="connectMockito"
>        startOnLoad="true"
>        statistics="disable"
>        trace="disable"
>        transports="http,https">
>    <target>
>       <inSequence>
>          <cache collector="false" maxMessageSize="1024" timeout="300">
>             <onCacheHit>
>                <respond/>
>             </onCacheHit>
>             <protocol type="HTTP">
>                <methods>GET</methods>
>                <headersToExcludeInHash/>
>                <responseCodes>(1|2)[0-9][0-9]</responseCodes>
>                <hashGenerator>org.wso2.carbon.mediator.cache.digest.
> HttpRequestHashGenerator</hashGenerator>
>             </protocol>
>             <implementation maxSize="100"/>
>          </cache>
>          <send>
>             <endpoint>
>                <address uri="http://demo2236300.mockable.io/testService"/>
>             </endpoint>
>          </send>
>       </inSequence>
>       <outSequence>
>          <log level="full"/>
>          <cache collector="true"/>
>          <send/>
>       </outSequence>
>    </target>
>    <description/>
> </proxy>
>
>
>
> *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: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><
> soapenv:Body><jsonObject><msg>Hello Worldaa</msg></jsonObject></
> soapenv:Body></soapenv:Envelope>
>
> [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-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]"
>
> [2018-02-01 11:14:51,036] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 >> "Host: keerthikas-macbook-pro.local:8280[\r][\n]"
>
> [2018-02-01 11:14:51,036] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 >> "User-Agent: curl/7.54.0[\r][\n]"
>
> [2018-02-01 11:14:51,036] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 >> "Accept: */*[\r][\n]"
>
> [2018-02-01 11:14:51,037] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 >> "Content-Type: application/json[\r][\n]"
>
> [2018-02-01 11:14:51,037] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 >> "[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "HTTP/1.1 200 OK[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "access-control-allow-origin: *[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "X-Cloud-Trace-Context: 8321c3bfbcd3e65e547803b2ed3252
> 00[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "cacheKey: -27-21-649412412586-85-97-
> 8340-52-11-819416[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "cache-control: no-cache[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "Content-Type: application/json; charset=UTF-8[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "Date: Thu, 01 Feb 2018 05:44:51 GMT[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "Transfer-Encoding: chunked[\r][\n]"
>
> [2018-02-01 11:14:51,045] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "[\r][\n]"
>
> [2018-02-01 11:14:51,046] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "0[\r][\n]"
>
> [2018-02-01 11:14:51,046] [EI-Core] DEBUG - wire HTTP-Listener I/O
> dispatcher-2 << "[\r][\n]"--
> <[email protected]>
> Keerthika Mahendralingam
> Software Engineer
> Mobile :+94 (0) 776 121144 <+94%2077%20612%201144>
> [email protected]
> WSO2, Inc.
> lean . enterprise . middleware
>



-- 
Riyafa Abdul Hameed
Software Engineer, WSO2 Lanka (Pvt) Ltd <http://wso2.com/>

Email: [email protected] <[email protected]>
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to