Re: [Dev] How to configure the Cache mediator in ESB 5.0.0

2017-11-29 Thread Susankha Nirmala
Hi Dilusha,

You can achieve your requirement with below sample API configuration.

http://ws.apache.org/ns/synapse"; name="TestAPI" context="/abc">
   
  
 

 
 

   
  
   


 
 

   http://www.mocky.io/v2/5a158a1f2e5f00eab752"/>

 
  
  
 

 
 
 
  
   


Thanks,
/Susankha.


On Wed, Nov 29, 2017 at 1:34 PM, Dilusha Alphonso  wrote:

> Hi All,
>
> I have created an API in wso2 ESB 5.0.0  to call the SOAP back-end
> service. I have used cache mediator for a normal GET method.  What I want
> is, I have used a GET Method to get some details, I passed the id with the
> URL.
>
> Requirement- When I call the service through API for a given id in the
> first time I need a proper response for particular id, then for next call
> for the same id it should get the response from the cache itself up-to-the
> given Timeout period. if I change the id then it should hit the service.
>
> I attached my configuration.
>
> http://ws.apache.org/ns/synapse"; name="Durdan"
> context="/test">
>  
>   
>  
>   hashGenerator="org.wso2.carbon.mediator.cache.digest.REQUESTHASHGenerator"
> timeout="60">
> 
>  
>  
>   
>
>
>   
>  http://schemas.
> xmlsoap.org/soap/envelope/">
> 
>12
> 
> 
>http://service.
> sample.durdans.com">
>   $1
>
> 
>  
>   
>   
>  
>   
>
>  
>   scope="transport"/>
>  
> 
>
> 
>  
>   
>   
> 
>  
>   
>
> 
>
>
> Above configuration, I was able to get the response for proper id. but
> cache mediator is not working.
>
>
> Can anyone help me to solve this??
>
> Thanks in advance.
> --
>
>
> *Best Regards,Dilusha Alphonso*
>
> *Software Engineer - Support Team*
>
>
> *WSO2*
> *Mobile : *
>
> *+94766837098 <+94%2076%20683%207098>[image: http://wso2.com/signature]
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Susankha Nirmala
Senior Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware

Mobile : +94 77 593 2146
blog : https://susankhanirmala.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to configure the Cache mediator in ESB 5.0.0

2017-11-29 Thread Dilusha Alphonso
Hi All,

I have created an API in wso2 ESB 5.0.0  to call the SOAP back-end service.
I have used cache mediator for a normal GET method.  What I want is, I have
used a GET Method to get some details, I passed the id with the URL.

Requirement- When I call the service through API for a given id in the
first time I need a proper response for particular id, then for next call
for the same id it should get the response from the cache itself up-to-the
given Timeout period. if I change the id then it should hit the service.

I attached my configuration.

http://ws.apache.org/ns/synapse"; name="Durdan" context="/test">
 
  
 
 

 
 
  
   
   
  
 http://schemas.xmlsoap.org/soap/envelope/";>

   12


   http://service.sample.durdans.com";>
  $1
   

 
  
  
 
  
   
 
 
 

   

 
  
  

 
  
   



Above configuration, I was able to get the response for proper id. but
cache mediator is not working.


Can anyone help me to solve this??

Thanks in advance.
-- 


*Best Regards,Dilusha Alphonso*

*Software Engineer - Support Team*


*WSO2*
*Mobile : *

*+94766837098[image: http://wso2.com/signature] *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev