NAME
XML::Compile::SOAP::HTTPDaemon - create SOAP over HTTP daemon
INHERITANCE
XML::Compile::SOAP::HTTPDaemon
is a XML::Compile::SOAP::Daemon
SYNOPSIS
# See XML::Compile::SOAP::Daemon for an example, but even better:
# have a look at the example enclosed in the distribution package.
DESCRIPTION
This module handles the exchange of (XML) messages over HTTP, according to the rules of SOAP (any version).
This abstraction level of the object (code in this pm file) is not concerned with parsing or composing XML, but only worries about the HTTP transport specifics of SOAP messages. The creation and decoding of the messages is handled by various XML::Compile::SOAP components, based on XML::Compile::Cache and XML::Compile. The processing of the message is handled by the XML::Compile::SOAP::Daemon base-class.
The server is as flexible as possible: accept M-POST (HTTP Extension Framework) and POST (standard HTTP) for any message. It can be used for any SOAP1.1 and SOAP1.2 mixture. Although SOAP1.2 itself is not implemented yet.
METHODS
Constructors
XML::Compile::SOAP::HTTPDaemon->new(OPTIONS)
Attributes
$obj->outputCharset
Running the server
$obj->process(CLIENT, XMLIN)
$obj->run(OPTIONS)
Preparations
$obj->addHandler(NAME, SOAP, CODE)
$obj->operationsFromWSDL(WSDL, OPTIONS)
Handlers
$obj->makeResponse(REQUEST, RC, MSG, BODY)
$obj->runRequest(REQUEST, CONNECTION)
Handle one REQUEST (HTTP::Request object), which was received from the CLIENT (string).
Helpers
$obj->actionFromHeader(REQUEST)
Collect the soap action URI from the request, with undef
on failure. Officially, the "SOAPAction" has no other purpose than the ability to route messages over HTTP: it should not be linked to the portname of the message (although it often can).
$obj->faultInvalidXML(ERROR)
$obj->faultNotSoapMessage(NODETYPE)
$obj->faultUnsupportedSoapVersion(ENV_NS)
$obj->handlers(('SOAP11'|'SOAP12'|SOAP))
$obj->printIndex([FILEHANDLE])
$obj->soapVersions
DETAILS
Configuration options
It depends on the type of Net::Server which you extend, which options are available to you on the command-line or in a configuration file. XML::Compile::SOAP::Daemon adds and changes some parameters as well.
Any XML::Compile::SOAP::HTTPDaemon
object will have the following additional configuration options:
Key Value Default
client_timeout integer seconds 30
client_maxreq integer 100
client_reqbonus integer seconds 0
name string "soap daemon"
For each client, we like to have a reset of the connection after some time, for two reasons: perl processes are usually leaking memory a bit so should not live for ever, and you can experience denial of service attacks. The client_timeout
value details the number of seconds a connection may live, but that will be increase by client_reqbonus
for every received message. In any case, after client_maxreq
messages were handled, the connection will be terminated.
The name
is included in the reply messages.
logging
SEE ALSO
This module is part of XML-Compile-SOAP-Daemon distribution version 2.02, built on February 08, 2010. Website: http://perl.overmeer.net/xml-compile/
All modules in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, and XML::Rewrite, XML::ExistDB, XML::LibXML::Simple.
Please post questions or ideas to the mailinglist at http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile For life contact with other developers, visit the #xml-compile
channel on irc.perl.org
.
LICENSE
Copyrights 2007-2010 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html