views:

455

answers:

2

I want to cache web services response XML at client side. How can i cache response XML at client side, so we don't have to wait for Server side response ?

Is there any mechanism available in Axis 1.4 that helps to caching server side response XML at client side ?

Scenario : I am consuming 1 search detail service method, which hits the servers of supplier every minute for different search criteria and most of the time search criteria is same. And for that again we are hitting servers and servers take time to return a response. I am thinking that Is there any mechanism in Axis 1.4, which will help me to store/cache response XML at client side. So, we don't have to hit servers for same search criteria and will take xmls or data from client side cached data.

Is there any configuration / settings required at Axis 1.4 .

I have started googling it and i am not finding any valuable details for caching at client side. Please provide me any tutorials of this.

+1  A: 

Instead of caching the XML response, you might be better off using EHCache to cache whatever objects you're creating as a result of the web servcie call.

If it's a matter of performance (i.e., your web service takes seconds to reply), then caching is a good idea. Nearly all of the AXIS webservices I've created ran sub-second, so caching may not be desireable or necessary in that instance.

T Reddy
A: 

You could try something like Apache Synapse (which supports caching) to sit on the client side and mediate all your requests to the web service.

Catchwa