Writing a CGI-based SOAP Server
SOAP Interview Questions and Answers
(Continued from previous question...)
Writing a CGI-based SOAP Server
Here's a simple CGI-based SOAP server (hibye.cgi):
#!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";
}
There are basically two parts to this: the first four lines set up a SOAP wrapper around a class. Everything from 'package Demo' onward is the class being wrapped.
(Continued on next question...)
Other Interview Questions
|