Mumbai - India
Is Axis 1.x capable of generating anything like BEA's Generated Asynchronous Web Service Client Stub? I think this would be useful in this kind of situation - apart from a hand coded solution.
Is configuring the org.apache.axis.client.Stub with setTimeout() and catching the resulting java.rmi.RemoteException the simplest thing one can do?
[ November 03, 2005: Message edited by: Peer Reynders ]
The webservice i've to call takes a lot of parameters. Depending upon the availability of the webservice, i've to decide whether to call the webservice or put my processing into batch mode. This is the business logic decision i've to take and for this i need to know whether the webservice is up or not. Please let me know if you are aware of any such method whereby i can check the web service availability ?
Thanks for the help / reply.
I think the best you can do is to telnet into the WS port (e.g. using Commons Net). If it succeeds you'd at least know that the host is reachable and that something is listening on the port.
Since the web service presumably does something complicated (which may rely on other backend systems that could also fail, which the WS would not necessarily know in advance), there is no way to tell whether a call will succeed without actually making one.
[ November 04, 2005: Message edited by: Ulf Dittmer ]
Is Axis 1.x capable of generating anything like BEA's Generated Asynchronous Web Service Client Stub?
I'm not aware of anything like this. Might make a good addition to the wsdl2java tool, though, so if you're knowledgeable about asynchonous WS, this could be your chance to give back to the Axis community
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 ]
Originally posted by Ulf Dittmer:
Might make a good addition to the wsdl2java tool, though, so if you're knowledgeable about asynchonous WS, this could be your chance to give back to the Axis community
Don't think I'm quite there yet but its an interesting proposal
I went looking for that functionality because .NET stubs automatically include BeginWebMethod and EndWebMethod methods (Communicating with XML Web Services Asynchronously).
Looks like something is going on because the org.apache.axis.client.async package is already there.