I use a java application to make a web service call. After some changes was decided that this same application should be able to decide, having multiple endpoints, which endpoint to call. These endpoints point to instances of the same web service. I used AXIS when I developed it. Could anyone helping me on changing it? How can I modify the application so it can decide what endpoint to use, to check if an endpoint is not responding.
Ok. So now let`s say that this service is deployed in more than one machine, using managed servers. And now I want to make my java application to, before calling, check if the service is available in the endpoint. If it`s not, then it should try the next one.
Ok, that gives a better idea. If you are referring to clustering in a group of servers to provide higher availability than with a single server, then you could look into the documentation of your server because this is specific to the provider. Here are a few links for GlassFish and Axis:
Or if clustering is not an option, then you can still have multiple ports (which are the same as endpoints) in a single wsdl. To be clear, I haven't tried this myself making it up as I go along but you can have multiple endpoints a.k.a. ports in a WSDL, each specifying a different address, but using the same binding:
And of course, servers usually have a method in there to check whether they are running. For example, Axis has an isRunning() method.
So maybe this is what you are looking for. In this case, if a wsdl generator does not generate multiple ports for the same address, then you might have to manually modify the wsdl and then use a static wsdl. LOL. If you try this out, please let me know if it works.
All said, with what you are trying to achieve, clustering is probably a better fit as it directly addresses your problem without any additional code on your part. Of course, there will be the clustering configuration work.