MyInterfaces::TestService::TestPort - SOAP Server Class for the TestService Web Service
use MyServer::TestService::TestPort; my $server = MyServer::TestService::TestPort->new({ dispatch_to => 'My::Handler::Class', transport_class => 'SOAP::WSDL::Server::CGI', # optional, default }); $server->handle();
SOAP Server handler for the TestService web service located at http://localhost:81/soap-wsdl-test/person.pl.
Constructor.
The dispatch_to argument is mandatory. It must be a class or object implementing the SOAP Service methods listed below.
dispatch_to
Your dispatch_to class has to implement the following methods:
The examples below serve as copy-and-paste prototypes to use in your class.
sub ListPerson { my ($self, $body, $header) = @_; # body is a ??? object - sorry, POD not implemented yet # header is a ??? object - sorry, POD not implemented yet # do something with body and header... return MyElements::ListPersonResponse->new( { out => { # MyTypes::ArrayOfPerson NewElement => { # MyTypes::Person PersonID => { # MyTypes::PersonID ID => $some_value, # int }, Salutation => $some_value, # string Name => $some_value, # string GivenName => $some_value, # string DateOfBirth => $some_value, # date HomeAddress => { # MyTypes::Address Street => $some_value, # string ZIP => $some_value, # string City => $some_value, # string Country => $some_value, # string PhoneNumber => $some_value, # PhoneNumber MobilePhoneNumber => $some_value, # PhoneNumber }, WorkAddress => { # MyTypes::Address Street => $some_value, # string ZIP => $some_value, # string City => $some_value, # string Country => $some_value, # string PhoneNumber => $some_value, # PhoneNumber MobilePhoneNumber => $some_value, # PhoneNumber }, Contracts => { # MyTypes::ArrayOfContract Contract => { # MyTypes::Contract ContractID => $some_value, # long ContractName => $some_value, # string }, }, }, }, }, ); }
Generated by SOAP::WSDL on Mon Dec 3 22:20:32 2007
To install SOAP::WSDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SOAP::WSDL
CPAN shell
perl -MCPAN -e shell install SOAP::WSDL
For more information on module installation, please visit the detailed CPAN module installation guide.