Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can Web Service give different responses to the same request?  RSS feed

 
Srinivas Yellapantula
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

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.

Thanks in advance,
Srinivas
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Srinivas Yellapantula
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt that the code mutated on its own.

Probably changes in the way it is being used has revealed a coding error.

I would bet on improper use of instance variables to hold data related to a single client request mixing up results from multiple requests.

Bill
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be a host of things

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 ?
 
Srinivas Yellapantula
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ 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.

The request looks like:

<sch: getItemList>
<sch:filterName>category</sch:filterName>
<sch:filterValue>cricket(or football)</sch:filterValue>
.
.
.
.
</sch: getItemList>

The entries in the logs gives us the query formed for the request. When i tried accessing that link, it's showing good response all the time.

What could be the reason?

Thanks,
Srinivas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!