RPC::XML set request timeout...
by Aristotelis other posts by this author
Nov 24 2005 3:50AM messages near this date
view in the new Beta List Site
Re: SOAP::Lite
|
Re: RPC::XML set request timeout...
& XSLT I would like to develop an application that makes use of the RPC::XML module. Is ther
e any way of setting a timeout parameter for the request I am making to a server, in order t
o detect a situation where the server URL is not correct or the server is down for example?
Please take a look at the following part of the developed code...
my $client = RPC::XML::Client-> new($SERVER_URL);
my $request = RPC::XML::request-> new("BalanceInquiry",RPC::XML::struct->new('MSISDN'=> RPC::
XML::string-> new($MSISDN),));
my $result = $client-> simple_request($request);
if (ref($result))
{
my $code=$result-> {'RETURNCODE'};
print $code."\n";
}
else
{
print $result."\n";
}
the above code block is enclosed within an eval but if for example I set an incorrect URL on
purpose, nothing seems to happen...
--------------------------------------------------------------------------------------------
Aristotelis Metsinis
Data Messaging Services Engineer
Technology Division, Value Added Services Development Department
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Tel: +30 210 6703942
Fax: +30 210 6702483
Mobile: +30 6944 300173
E-mail: aristotelis.metsinis@[...].com
Vodafone Panafon S.A.
Registered Office: 1-3 Tzavella Str., 15231, Halandri, Greece
Registered in Greece No 26089/01AT/B/92/276/04
--------------------------------------------------------------------------------------------
Attachments:
unknown2
unknown3
unknown4
unknown5
Thread:
Aristotelis
Randy J. Ray
Dominic Mitchell
Ulisses Reina Montenegro
|