Loading ...
Sorry, an error occurred while loading the content.

... a better question regarding timeouts on SOAP calls

Expand Messages
  • jmzorko@mac.com
    Hello, all ... How do I tell if a SOAP call failed due to a timeout or some other reason i.e. server not running? Consider: while ( $listener- handle ) { my
    Message 1 of 1 , Jan 12, 2005
    View Source
    • 0 Attachment
      Hello, all ...

      How do I tell if a SOAP call failed due to a timeout or some other
      reason i.e. server not running? Consider:

      while ( $listener->handle )
      {
      my $msg = {};
      $msg->{data1} = "this is some data";
      $msg->{data2} = "and this is more data";
      $msg->{event} = "DataDetected";

      my $som = eval { $proxy->sendEvent( $msg ) };

      if ( $som )
      {
      print $som->faultstring . "\n";
      }

      sleep 1;
      }

      ... I have to SOAP call in an eval block so the script won't die if the
      server is not running, but I get the same result if the server is busy
      i.e. SOAP method did a sleep for mucho longo time (I set the timeout to
      5 seconds). How can I tell the difference between "can't connect to
      server" (not running) and "server is just too damn busy" (running, but
      busy with another SOAP call)?

      Regards,

      John

      Falling You - exploring the beauty of voice and sound
      New album, "Touch", available now
      http://www.magnatune.com/artists/falling_you
    Your message has been successfully submitted and would be delivered to recipients shortly.