I'm facing a strange problem. For the same request, my webservices is giving me different responses . Can anyone tell me the reason behind this strange behavior of web services? I have cleared the cache also but still the problem persists .
Please help me.
That depends on the service in question. If the answer depends on parameters that are not always the same (time of request, client IP address, random numbers, etc.) then obviously the response can be different.
Did you write this service? If so, have you debugged it to see where the response handling starts deviating from what you think it should be?
posted 9 years ago
The problem is that it's giving 2 responses for the same request (same paramaters). For example, when i give paramters: category: cricket, it's giving me tennis category output sometimes !! We never faced this problem for the last 2 years. All of a sudden, it's behavior changed . We havent written the services, some 3rd party has written it for us.
1. Instance variables like Bill suggested
2. Some sort of incorrect caching
3. Wrong mapping of categories to their category IDs
4. May be the service never received / recognized the category and defaults to tennis
5. Your servers are behind a cluster and one of the nodes behaves badly
I could go on. You need to provide us with more information. What does the RAW request look like ? Debug the service or introduce log statements to print out the category that it receives. What does the category look like ?
@ Bill: Could you kindly please explain a bit more?
@ Deepak: Could you please what incorrect caching is and what leads to it? Also throw some light on the 5th point you mentioned.
Web services worked fine for the past 2 years. This problem started recently . For same request, we are getting good, bad and zero response at times!
Category doesn't default to tennis, i just quoted an example. Not only tennis, sometimes some other sports items are returned by webservice for cricket or other sport. The problem is found for only one request method and when it's parameters are given as category and cricket or football as of now.