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

4790SOAP::Lite timeout issue?

Expand Messages
  • Dominick Meglio
    Jul 12, 2005
    • 0 Attachment
      Hello, I am attempting to test my SOAP::Lite client in various error
      conditions. One such condition is when the SOAP server cannot be
      reached (i.e., a connection timeout occurs).

      I have set a timeout for the object:
      my $soap = SOAP::Lite->uri($uri)->proxy($proxy, timeout => 10);

      As I understand it, this should make a timeout occur after 10 seconds.

      Next is my method call:


      Since the server is not running, this will cause a connection timeout.
      After 3 minutes (not 10 seconds), I receive a message:

      500 Connect failed: connect: Connection timed out; Connection timed out

      Also, it is important to note that if the method call is NOT in an
      eval {};, then I get an exception when the timeout occurs (something I
      cannot find documented anywhere).

      My question is, how do I get the connect attempt to stop if my
      specified timeout has elapsed, and simply allow me to detect the error
      condition and allow my program to continue on?

      Thanks in advance,
      Dominick Meglio
    • Show all 2 messages in this topic