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 (

SOAP::Lite -> uri('http://something.com') -> proxy('https://somesite.com/CollaborationTool_WS.asmx', t +imeout =>5);
) without any luck or change of behavior.

T

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.