Thread

Posted on Wed Apr 30 18:25:54 2008 by oly
Modify default timeout
Hi,

I could not find documentation on how to set a given timeout in a client. I was using
$soap->proxy($proxy, timeout => 1000);
previously. But this relied on SOAP::Lite, isn't it? Is it still possible with SOAP::WSDL 2 ?

Olivier
Direct Responses: 7808 | Write a response
Posted on Sat May 3 03:01:44 2008 by noah in response to 7799
Re: Modify default timeout
A proxy() method is provided for backwards compatibility; running this:
my $soap = MyInterfaces::MyService::ServicePort->new(); $soap->proxy($proxy, timeout => 1);
...against simple server which sleeps for 5 seconds when processing a request results in a timeout after ~1s. If you wish to bypass the backward compatibility, you can do retrieve the transport object and set the timeout on it, like this:
my $soap = MyInterfaces::MyService::ServicePort->new(); $soap->get_transport()->timeout(1);
Noah
Write a response