I have a Soap-Lite client implemented in Perl that queries a remote .Net SOAP service. All works will in test and production... until the remote server goes offline. Then the SOAP client hangs during the connection process. I had implemented an error handling routine that handles connection errors, but when the remote server went off the air, the connection never completed, thus never entering the fault (in a timely manner, that is). Now, the thing that confuses the heck out of me is that if I test this in condition in my lab environment, it takes about 2 seconds and then fails. If I do it in production, it never even makes it past the $result1 call to tell me how long it is taking. The only difference that I am aware of is that the production environment uses fiber and an ATM network adapter, and my lab uses standard ethernet. Any ideas?
Caveats - This is using SOAP-Lite 0.69 (I can't upgrade right now), and I have tried adding 'timeout' to the proxy (
) without any luck or change of behavior. TSOAP::Lite -> uri('http://something.com') -> proxy('https://somesite.com/CollaborationTool_WS.asmx', t +imeout =>5);
Client connector code below:
use SOAP::Lite on_action=> sub {sprintf '%s%s', @_},on_fault => \&faul +thandler; sub connectToSOAP { my $soap = SOAP::Lite -> uri('http://something.com') -> proxy('https://somesite.com/CollaborationTool_WS.asmx'); $soap->serializer->register_ns("http://schemas.xmlsoap.org/soap/ +envelope/","soap"); my $result1 = $soap ->call(SOAP::Data->name('GetEventInfoByEventID')->attr({xmlns => ' +http://something.com/'}) => SOAP::Data->name('EventID')->value($EventID)->type('') ); ## Never gets here if remote server is off air blah blah blah } sub faulthandler { my ($soap, $res) = @_; if ($debug) { die("*** SOAP Fault: " . $res->faultstring); } else { return 0; } }
In reply to SOAP-Lite and connection problems by banesong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |