views:

25

answers:

2

If an application relies heavily on SOAP Web Services to pull data and construct pages based on this data it receives, how is the best way to determine and handle it if the soap web service is not functional ?

Is it possible for the WSDL to be available but the web service be down? I am told that this is possible.

History to understand the project and my concerns:

  • This application was built because we have a 3rd party vendor service-now.com supplying us with IT management.
  • The problem is that service-now's web based interface is not accessible and we cannot provide a non-accessible service to our end users. Once we learned about their web service provisions, I rebuilt the self service service-now module entirely in php using soap and interacting with their web services to perform CRUD on their data. This way we have a better looking interface and its accessible.

My concern though lies in what to do and how to nicely handle the errors when the web service goes down.

I have coded an interface defining all interaction with the web service and I coded a client class which implements this interface. All methods in the client class are within try/catches so I know when something went wrong with requesting data or pulling data from this web service.

But, what about preemptively checking to see if the web service is down before presenting the user with the login page. This is what I really want to get it.

+1  A: 

The only way to determine it's down is to do a request. If it's only pulling data, not altering it, and pulls the same data often, you might want to cache the return (the owner of the webservice might even like that), and serve that when the server isn't reachable / the request fails.

A server can be down when the wsdl is available, it can even spew SOAP error messages not related to your request if something is wrong on the server, etc.

Wrikken
I am giong to update my question to explain the situation in more detail.
Chris
+1  A: 

It is not uncommon for SOAP web services to have a hearbeat method.

This method does no processing but returns a specific value.

There are multiple discussions as to what this method should be and what it should return. You can check out this link for some options

If your call to the service heartbeat method gives you that value, then the service is up and running else there is a problem with connectivity to the service / service is not functional.

InSane
Thank you, I am going to look into this. Only problem I see is that I am not the implementer of the soap server, merely the soap client so I will have to work with vendor to see if I can get them to implement this.
Chris