use SOAP::Lite on_action=> sub {sprintf '%s%s', @_},on_fault => \&faulthandler; 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; } }