soap::Lite help please

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top