Hi there folks, I hope this is a simple question, but a search of the archives did not turn up a specific answer. I am using client-side Axis to connect to a remove SOAP service (also Axis, but this is irrelevant for this particular question).
I'm in the midst of putting in code to detect various error states and have run into an odd problem. It's not entirely clear how to detect if the service is currently down. I've been able to detect networking problems in connecting to the host via MalformedURLException, and was semi-expecting that a RemoteException would be thrown upon invoking a Call object that connects to a service which isn't running. Instead I get a null return value from the invoke(). This is less than ideal for my purposes, since when it's working the service can also return null.
Perhaps the answer will be that my service needs to change to not return null, in which case null is a valid way to detect Connection Refused errors, but I'm hoping there is a better way.
Your time in answering this question is highly appreciated!
James