NAME
SOAP::WSDL::Server::CGI - CGI based SOAP server
SYNOPSIS
use MyServer::TestService::TestPort;
my $server = MyServer::TestService::TestPort->new({
dispatch_to => 'main',
transport_class => 'SOAP::WSDL::Server::CGI', # optional, default
});
$server->handle();
USAGE
To use SOAP::WSDL::Server::CGI efficiently, you should first create a server interface using wsdl2perl.pl.
SOAP::WSDL::Server dispatches all calls to appropriately named methods in the class or object set via dispatch_to
.
See the generated server class on details.
DESCRIPTION
Lightweight CGI based SOAP server. SOAP::WSDL::Server::CGI does not provide the fancier things of CGI handling, like URL parsing, parameter extraction or the like, but provides a basic SOAP server using SOAP::WSDL::Server.
METHODS
EXCEPTION HANDLING
SOAP::WSDL::CGI handles the following errors:
XML parsing error
The proper way to throw a exception is just to die - SOAP::WSDL::Server::CGI catches the exception and sends a SOAP Fault back to the client.
If you want more control over the SOAP Fault sent to the client, you can die with a SOAP::WSDL::SOAP::Fault11 object - or just let the SOAP::Server's deserializer create one for you:
my $soap = MyServer::SomeService->new();
die $soap->get_deserializer()->generate_fault({
code => 'soap:Server',
role => 'urn:localhost',
message => "The error message to pas back",
detail => "Some details on the error",
});
You may use any other object as exception, provided it has a serialize() method which returns the object's XML representation.
LICENSE AND COPYRIGHT
Copyright 2004-2008 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
AUTHOR
Martin Kutter <martin.kutter fen-net.de>
REPOSITORY INFORMATION
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: Client.pm 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $