#!/usr/local/bin/perl -w
# hw_client.pl - Hello client
use SOAP::Lite;
my $name = shift;
print "\n\n" . "Calling the SOAP Server to say hello\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
-> uri('urn:Hello')
-> proxy('http://JensenWorld.net:8080/cgi-bin/helloworld.cgi')
-> sayHello( $name )
-> result . "\n\n";
Run the script using:
% perl -w hw_client.pl "Mr. Smith"
There is also a good-bye SOAP server. The client script for it is similar to the above:
#!/usr/local/bin/perl -w
# gw_client.pl - Goodby client
use SOAP::Lite;
my $name = shift;
print "\n\n" . "Calling the SOAP Server to say goodby\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
-> uri('urn:Hello')
->
proxy('http://JensenWorld.net:8080/cgi-bin/byeworld.cgi')
-> sayBye( $name )
-> result . "\n\n";
Please feel free to try out the two SOAP servers.