#!perl -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
package Demo;
sub hi {
return "hello, world";
}
sub bye {
return "goodbye, cruel world";
}
sub languages {
return ("Perl", "C", "sh");
}
The above sample code is from "http://guide.soaplite.com/#autodispatching"
Correct me if I'm wrong:
If client call server->hibye.cgi->sub hi
hibye.cgi will go to package Demo->sub hi and return "hello, world"
So, my questions are:
If there is a wsdl, can I still use the above code?
and
the above sample code, the dispatch_to is "hard coded", can I do dynamic?
Please advise. Thanks.
|