#!/usr/bin/perl -l use strict; use warnings; use SOAP::Lite; my $uri = 'http://www.example.com'; sub check_result { my ( $self, $code, $IP, $PORT ) = @_; my $proxyURL = "http://$IP:$PORT/REMOTE_SOAP"; my $soap = SOAP::Lite->uri($uri)->proxy($proxyURL); $soap->autotype(0); $soap->default_ns('http://REMOTENAMESPACE/namespace/default'); $soap->proxy->timeout(15); $soap->on_fault( sub { my ( $soap, $res ) = @_; eval { die ref $res ? $res->faultstring : $soap->transport->status }; return ref $res ? $res : new SOAP::SOM; } ); my $som = $soap->call( "remote_function", SOAP::Data->name('Entry1')->value($code), ); return $som->paramsout; }