D
dmedhora
Hi,
Am picking up SOAP::Lite and was trying out the following code which I
don't
understand why it doesn't work..
I have apache httpd running and in my /var/www/cgi-bin/ws directory I
have
the following files:
1) Hello.pm
----------------
# Hello.pm - simple Hello module
package Hello;
sub sayHello {
shift; # remove class name
return "Hello " . shift;
}
1;
2) hello.cgi
--------------
#!/usr/bin/perl
# hello.cgi - Hello SOAP handler
use lib '/var/www/cgi-bin/ws';
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Hello:?:sayHello)')
-> handle
;
3) hw_client.pl
-------------------
#!/usr/bin/perl -w
# hw_client.pl - Hello client
use SOAP::Lite;
my $name = shift;
print "The SOAP Server says: ";
print SOAP::Lite
->uri('http://localhost/cgi-bin/ws')
->proxy('http://localhost/cgi-bin/ws/hello.cgi')
->sayHello($name)-> result . "\n\n";
When I run hw_client.pl with the argument "myname", I get an error as
follows:
-bash-3.00# ./hw_client.pl myname
Use of uninitialized value in concatenation (.) or string at
../hw_client.pl line 6.
The SOAP Server says:
-bash-3.00#
Please can anyone help me to debug it? Thanks ver much
Am picking up SOAP::Lite and was trying out the following code which I
don't
understand why it doesn't work..
I have apache httpd running and in my /var/www/cgi-bin/ws directory I
have
the following files:
1) Hello.pm
----------------
# Hello.pm - simple Hello module
package Hello;
sub sayHello {
shift; # remove class name
return "Hello " . shift;
}
1;
2) hello.cgi
--------------
#!/usr/bin/perl
# hello.cgi - Hello SOAP handler
use lib '/var/www/cgi-bin/ws';
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Hello:?:sayHello)')
-> handle
;
3) hw_client.pl
-------------------
#!/usr/bin/perl -w
# hw_client.pl - Hello client
use SOAP::Lite;
my $name = shift;
print "The SOAP Server says: ";
print SOAP::Lite
->uri('http://localhost/cgi-bin/ws')
->proxy('http://localhost/cgi-bin/ws/hello.cgi')
->sayHello($name)-> result . "\n\n";
When I run hw_client.pl with the argument "myname", I get an error as
follows:
-bash-3.00# ./hw_client.pl myname
Use of uninitialized value in concatenation (.) or string at
../hw_client.pl line 6.
The SOAP Server says:
-bash-3.00#
Please can anyone help me to debug it? Thanks ver much