For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > November 2005 > RPC XML request timeout









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RPC XML request timeout
ametsi

2005-11-24, 1:51 am

I am trying to develop an application that uses the RPC XML perl module. My
question is if and how you can set a timeout value for the request in case e.g. the server is down or you have given incorrect URL. Please take a look at the 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";
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com