• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Service Availability

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody suggest me a way of checking a particular web service availability? I'm using AXIS and i need to decide about a particular or alternative course of action in my business logic depending upon the availability of the web service i'm using.

Thanks,

Syed Rizvi,
Senior Consultant,
Deloitte Consulting,
Mumbai - India
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you just call it to see if it's there? I guess I must be missing something about your problem.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf:
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 ]
 
Syed Rizvi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ulf,
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.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Syed,
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 ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic