|
NAMEXML::Compile::SOAP::Daemon::NetServer - SOAP server based on Net::ServerINHERITANCEXML::Compile::SOAP::Daemon::NetServer is a XML::Compile::SOAP::Daemon SYNOPSIS#### have a look in the examples directory! use XML::Compile::SOAP::Daemon::NetServer; use XML::Compile::SOAP11; use XML::Compile::SOAP::WSA; # optional # Be warned that the daemon will be Net::Server based, which # consumes command-line arguments! "local @ARGV;" maybe useful my $daemon = XML::Compile::SOAP::Daemon::NetServer->new; # daemon definitions from WSDL my $wsdl = XML::Compile::WSDL11->new(...); $wsdl->importDefinitions(...); # more schemas $daemon->operationsFromWSDL($wsdl, callbacks => ...); # daemon definitions added manually (when no WSDL) my $soap11 = XML::Compile::SOAP11::Server->new(schemas => $wsdl->schemas); my $handler = $soap11->compileHandler(...); $daemon->addHandler('getInfo', $soap11, $handler); # see what is defined: $daemon->printIndex; # finally, run the server. This never returns. $daemon->run(@daemon_options); DESCRIPTIONThis module handles the exchange of SOAP messages over HTTP with Net::Server as daemon implementation, It uses HTTP::Request and HTTP::Response object provided by LWP, via functions provided by XML::Compile::SOAP::Daemon::LWPutil.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 processing of the SOAP 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. Extends "DESCRIPTION" in XML::Compile::SOAP::Daemon. METHODSExtends "METHODS" in XML::Compile::SOAP::Daemon.ConstructorsExtends "Constructors" in XML::Compile::SOAP::Daemon.
AttributesExtends "Attributes" in XML::Compile::SOAP::Daemon.
Running the serverExtends "Running the server" in XML::Compile::SOAP::Daemon.
PreparationsExtends "Preparations" in XML::Compile::SOAP::Daemon.
HelpersExtends "Helpers" in XML::Compile::SOAP::Daemon.
DETAILSExtends "DETAILS" in XML::Compile::SOAP::Daemon.Operation handlersExtends "Operation handlers" in XML::Compile::SOAP::Daemon.Returning errorsExtends "Returning errors" in XML::Compile::SOAP::Daemon.Configuration optionsThis module will wrap any kind of Net::Server, for instance a Net::Server::PreFork. It depends on the type of "Net::Server" you specify (see new(based_on)) which configuration options are available on the command-line, in a configuration file, or with run(). Each daemon extension implementation will add some configuration options as well.Any "XML::Compile::SOAP::Daemon::NetServer" 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" Some general configuration options of Net::Server have a different default. See also the next section about logging. Key Value New default setsid boolean true background boolean true 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 An attempt is made to merge XML::Compile's Log::Report and Net::Server log configuration. By hijacking the "log()" method, all Net::Server internal errors are dispatched over the Log::Report framework. Log levels are translated into report reasons: 0=ERROR, 1=WARNING, 2=NOTICE, 3=INFO, 4=TRACE. When you specify "Sys::Syslog" or a filename, default dispatchers of type SYSLOG resp FILE are created for you. When the "log_file" type is set to "Log::Report", you have much more control over the process, but all log related configuration options will get ignored. In that case, you must have initialized the dispatcher framework the way Log::Report is doing it: before the daemon is initiated. See Log::Report subroutine dispatcher. Key Value Default log_file filename|Sys::Syslog|Log::Report Log::Report log_level 0..4 | REASON 2 (NOTICE) SEE ALSOThis module is part of XML-Compile-SOAP-Daemon distribution version 3.14, built on May 11, 2018. Website: http://perl.overmeer.net/CPAN/LICENSECopyrights 2007-2018 by [Mark Overmeer <markov@cpan.org>]. 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://dev.perl.org/licenses/
Visit the GSP FreeBSD Man Page Interface. |