Syed,
I presume that you have no control over the web service that you are using?
The key point is that you do not define what "available" means in your business context. The suggestions Ulf is making let you determine if the host is available - but that will not tell you whether the host is (over)loaded. I suspect that whether the "business service" is "available" isn't a function of the web service technology employed but the fact that you are dealing with a business process that requires an intensive processing effort and the may run over a longer duration - that is a problem that needs to be identified in your business processes so that you can then address it properly with the available web services technology.
An intensive processing effort/long duration web service should have been implemented by using the
Asynchronous Business Process Pattern or at least implemented in a "request/reply operation with polling" fashion (see
Asynchronous operations and Web services, Part 2,
Asynchronous operations and Web services, Part 1: A primer on asynchronous transactions).
Originally posted by Syed Rizvi:
i've to decide whether to call the webservice or put my processing into batch mode.
.
Are the "web service" and "batch mode" completely disparate mechanisms for satisfying the same goal?
Or do they essentially use the same resources to accomplish their goal? If they use the same resources wouldn't it make more sense to remove the burden of this decision from the client and have the webservice put the request on the queue - giving the client a "contact me for the results later" response?
[ November 04, 2005: Message edited by: Peer Reynders ]