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

WSDL timeouts

Expand Messages
  • mpafrica2001
    Hi, Firstly, thanks to all for the great module and the mailing list support. You haven t heard from me before because I ve found my answers in the archives.
    Message 1 of 1 , Jul 17, 2003
    • 0 Attachment
      Hi,

      Firstly, thanks to all for the great module and the mailing list
      support. You haven't heard from me before because I've found my
      answers in the archives. On to the matter at hand:

      I have seen how to set the timeout as part of the call to proxy

      eval {
      $service = SOAP::Lite->service($wsdl)
      ->proxy($endpoint, timeout => 5)
      ->on_action(sub{join '', @_ });

      $service->call(...);
      }

      which works fine in the normal situation where the WSDL is available
      and the actual call times out. Control returns after 5 seconds via an
      eval exception as expected.

      However, in the situation where the fetch for the WSDL itself times
      out, it takes a full 180 seconds for the exception to return.

      Looking in SOAP::schema::access, I see that I can hack in the timeout
      there when the LWP::UserAgent object is constructed.

      sub access { require LWP::UserAgent;
      ...
      my $ua = LWP::UserAgent->new(timeout => $ENV{SOAP_SCHEMA_TIMEOUT} ||
      180);

      but it would be better if I could pass the timeout in as part of the
      call to service. That is:

      $service = SOAP::Lite->service($wsdl, timeout => 5)
      ->proxy($endpoint, timeout => 5)
      ->on_action(sub{join '', @_ });

      I'll try and submit a proper patch when I have time to get my head
      around how to get the parameter from the service method through to the
      access method.

      Cheers,

      --
      Michael Brader michael.brader@...
      Senior Software Developer (Unix) ntl:ipd
      Hook 01256 75(3413)
    Your message has been successfully submitted and would be delivered to recipients shortly.