4 Replies Latest reply on Apr 23, 2008 12:16 PM by -windowns-

    Pragmatically Reload WSDL for WebService

      Hey everyone,

      I'm new here and i'm starting to try out RIA. I'm currently working against a little test web service. Pretty simple and trim. Here's my problem.

      I want to seemlessly handle when the web service goes down. The senario is like this:

      1.) WebService goes offline at the web server.
      2.) User executes an operation with returns with a ioError fault.
      3.) This error is captured and identified as a "Disconnection"
      4.) Now the user is presented with a modal popup informing them the web service is down.
      5.) A time was started that will test if the web service is online at a set interval.
      6.) When the service is back online, the modal popup is removed, and the user can continue with their work

      My reconnection code is pretty simple. It's:


      My assumption is that when you execute the loadWSDL, it will go out to the server and attempt to download and reload the WSDL. There is a fault capture on the main webservice so i can detect when the loadWSDL fails. If it fails, the webserivce is offline so i keep the modal up. If the loadWSDL can be loaded, the "load" event is fired for the webservice. I detect this event and remove the modal popup.

      However, the loadWSDL does not go back to the server. It detects that it has already been loaded, and fires the "load" event for the webservice.

      So my main goal here is to have a way to test if the webservice is online. I *could* develop a simple webservice function that simply returns a string if it's online. But i want to avoid having odd calls like that in my webservice. There has to be a way you can do this.

      Any help would be hugely appreciated.