--- Venkatraman S <blizzard_venkat@xxxxxxxxxxx> wrote:
Hi,uri('http://abc/cgi-bin/pqr/venky_temp/Temperatures')
I am trying to create a small webservice using
Perl.
I have 2 files : temp.pl and temper.cgi ( as
specified in
http://www.perl.com/pub/a/2001/01/soap.html). When
i try calling , "$ perl temp.pl" , i am getting the
following an error after a gap of around 3-4
minutes: 500 Can't connect to abc:80 (connect:
timeout) at temp.pl line 6
Has anyone any previous experience with creating
Web-Services using Perl?
Regards,
Venkat
$ cat temp.pl
#! /usr/local/bin/perl
BEGIN {push
@INC,"/home/xxx/yyy/SOAP/install/lib/5.8.1";}
use SOAP::Lite;
print SOAP::Lite
->
->proxy('http://abc/cgi-bin/pqr/venky_temp/temper.cgi')
-> c2f(37.5)abc shud be substituted with the name of the SOAP
-> result;
$ cat temper.cgi
#! /usr/local/bin/perl
BEGIN {push
@INC,"/home/xxx/yyy/SOAP/install/lib/5.8.1";}
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Temperatures')
-> handle;
package Temperatures;
sub f2c {
my ($class, $f) = @_;
return 5 / 9 * ($f - 32);
}
sub c2f {
my ($class, $c) = @_;
return 32 + $c * 9 / 5;
}