S
Some1
Hello All,
I have written SOAP client send two variables "two massages" , also I
have written SOAP server accept one variable. My problem I want the
soap server accept two variables "two massages" and replay with
results.
Helle.pm file
======================
package Hello;
sub sayHello {
shift;
return "Hello Jack" if shift eq "Jack";
die "Sorry..\n";
}
1;
hello.cgi
===============================
#!/usr/bin/perl -w
use lib '/var/www/cgi-bin/Hello';
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Hello:?:sayHello)')
-> handle
;
#############################
Hello.pm and hello.cgi all of them in the same folder /var/www/cgi-bin
Now the soap client script hclient.pl:
===============================
#!/usr/bin/perl -w
use SOAP::Lite;
my $name = shift;
my $lname = shift ;
print "\n\nCalling the SOAP Server to say hello\n\n";
print "The SOAP Server says: \n";
print SOAP::Lite
-> uri('urn:Hello')
-> proxy('http://homesrv/cgi-bin/hello.cgi')
-> sayHello($name,$lname)
-> result . "\n\n";
##############################END##################################3
If I run "perl hclient.pl Jack" it is working fine, but when I tried
"perl hclient.pl Jack King" it will not work... why?
by the way Jack is variable 1 and King variable 2, I want my soap
server accept all the variables.
Could you please guide me where is my mistake or how to fix it?
I have written SOAP client send two variables "two massages" , also I
have written SOAP server accept one variable. My problem I want the
soap server accept two variables "two massages" and replay with
results.
Helle.pm file
======================
package Hello;
sub sayHello {
shift;
return "Hello Jack" if shift eq "Jack";
die "Sorry..\n";
}
1;
hello.cgi
===============================
#!/usr/bin/perl -w
use lib '/var/www/cgi-bin/Hello';
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Hello:?:sayHello)')
-> handle
;
#############################
Hello.pm and hello.cgi all of them in the same folder /var/www/cgi-bin
Now the soap client script hclient.pl:
===============================
#!/usr/bin/perl -w
use SOAP::Lite;
my $name = shift;
my $lname = shift ;
print "\n\nCalling the SOAP Server to say hello\n\n";
print "The SOAP Server says: \n";
print SOAP::Lite
-> uri('urn:Hello')
-> proxy('http://homesrv/cgi-bin/hello.cgi')
-> sayHello($name,$lname)
-> result . "\n\n";
##############################END##################################3
If I run "perl hclient.pl Jack" it is working fine, but when I tried
"perl hclient.pl Jack King" it will not work... why?
by the way Jack is variable 1 and King variable 2, I want my soap
server accept all the variables.
Could you please guide me where is my mistake or how to fix it?