Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XML::COMPILE::SOAP::DAEMON::NETSERVER (3)

.ds Aq ’


XML::Compile::SOAP::Daemon::NetServer - SOAP server based on Net::Server



   is a XML::Compile::SOAP::Daemon


 #### 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:

 # finally, run the server.  This never returns.


This 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.


Extends METHODS in XML::Compile::SOAP::Daemon.


Extends Constructors in XML::Compile::SOAP::Daemon.
XML::Compile::SOAP::Daemon::NetServer-><B>newB>(%options) Create the server handler, which extends some class which implements a Net::Server daemon. Any daemon configuration parameter should be passed with run(). This is a little tricky. Read below in the Configuration options section.

 -Option            --Defined in                --Default
  accept_slow_select  XML::Compile::SOAP::Daemon  <true>
  based_on                                        Net::Server::PreFork
  output_charset      XML::Compile::SOAP::Daemon  UTF-8
  soap_action_input   XML::Compile::SOAP::Daemon  {}
  wsa_action_input    XML::Compile::SOAP::Daemon  {}
  wsa_action_output   XML::Compile::SOAP::Daemon  {}

accept_slow_select => BOOLEAN
based_on => any Net::Server OBJECT|CLASS You may pass your own Net::Server compatible daemon, if you feel a need to initialize it or prefer an other one. Preferrably, pass configuration settings to run(). You may also specify any Net::Server compatible CLASS name.
output_charset => STRING
soap_action_input => HASH|ARRAY
wsa_action_input => HASH|ARRAY
wsa_action_output => HASH|ARRAY


Extends Attributes in XML::Compile::SOAP::Daemon.
$obj-><B>addSoapActionB>(HASH|PAIRS) Inherited, see Attributes in XML::Compile::SOAP::Daemon
$obj-><B>addWsaTableB>( <’INPUT’|’OUTPUT’>, [HASH|PAIRS] ) Inherited, see Attributes in XML::Compile::SOAP::Daemon
$obj-><B>outputCharsetB>() Inherited, see Attributes in XML::Compile::SOAP::Daemon

    Running the server

Extends Running the server in XML::Compile::SOAP::Daemon.
$obj-><B>processB>($client, $xmlin, $request, $action) Inherited, see Running the server in XML::Compile::SOAP::Daemon
$obj-><B>runB>(%options) See Net::Server subroutine run, but the %options are passed as list, not as HASH. You may pass any option to which accepted by the Net::Server extension you are using.

 -Option     --Default
  postprocess  undef

postprocess => CODE See the section about this option in the DETAILS chapter of the XML::Compile::SOAP::Daemon::LWPutil manual-page.


Extends Preparations in XML::Compile::SOAP::Daemon.
$obj-><B>addHandlerB>($name, $soap, CODE) Inherited, see Preparations in XML::Compile::SOAP::Daemon
$obj-><B>operationsFromWSDLB>($wsdl, %options) Inherited, see Preparations in XML::Compile::SOAP::Daemon
$obj-><B>setWsdlResponseB>( $filename, [$filetype] ) Inherited, see Preparations in XML::Compile::SOAP::Daemon


Extends Helpers in XML::Compile::SOAP::Daemon.
$obj-><B>faultInvalidXMLB>($error) Inherited, see Helpers in XML::Compile::SOAP::Daemon
$obj-><B>faultNotSoapMessageB>($nodetype) Inherited, see Helpers in XML::Compile::SOAP::Daemon
$obj-><B>faultUnsupportedSoapVersionB>($env_ns) Inherited, see Helpers in XML::Compile::SOAP::Daemon
$obj-><B>handlersB>( <’SOAP11’|’SOAP12’|$soap> ) Inherited, see Helpers in XML::Compile::SOAP::Daemon
$obj-><B>printIndexB>( [$fh] ) Inherited, see Helpers in XML::Compile::SOAP::Daemon
$obj-><B>soapVersionsB>() Inherited, see Helpers in XML::Compile::SOAP::Daemon


Extends DETAILS in XML::Compile::SOAP::Daemon.

    Operation handlers

Extends Operation handlers in XML::Compile::SOAP::Daemon.

    Returning errors

Extends Returning errors in XML::Compile::SOAP::Daemon.

    Configuration options

This 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.


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)


This module is part of XML-Compile-SOAP-Daemon distribution version 3.11, built on January 14, 2015. Website:

Other distributions in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::WSDL11, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::C14N, XML::Compile::WSS, XML::Compile::WSS::Signature, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, XML::Rewrite and XML::LibXML::Simple.

Please post questions or ideas to the mailinglist at . For live contact with other developers, visit the #xml-compile channel on


Copyrights 2007-2015 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

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 XML::COMPILE::SOAP::DAEMON::NETSERVER (3) 2015-01-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.