1SOAP::WSDL::Server::ModU_sPeerrlC2o(n3t)ributed Perl DocSuOmAePn:t:aWtSiDoLn::Server::Mod_Perl2(3)
2
3
4
6 SOAP::WSDL::Server::Mod_Perl2 - mod_perl based SOAP server using
7 SOAP::WSDL
8
10 Perl module providing a mod_perl2-based SOAP server using SOAP::WSDL
11
13 Configuration is managed through the use of PerlSetVar directives. The
14 following variables are available:
15
16 dispatch_to
17 Takes as a single argument the package name of the module which
18 contains the methods which handle SOAP requests.
19
20 PerlSetVar dispatch_to "WebPackage::SOAPMethods"
21
22 soap_service
23 Takes as a single argument the package name of the Server module
24 generated by SOAP::WSDL using
25
26 wsdl2perl.pl --server file:///path/to/your/wsdl
27
28 By default, the name of the package is
29 MyServer::$SERVICENAME::$PORTTYPE.
30
31 EXAMPLE: Given this sample WSDL which wsdl2perl.pl was run against to
32 generate perl packages:
33
34 <wsdl:portType name="WebServiceSoap">
35 [...]
36 </wsdl:portType>
37
38 [...]
39
40 <wsdl:service name="WebService">
41 <wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">
42 <soap:address location="http://www.example.com/WebService"/>
43 </wsdl:port>
44 </wsdl:service>
45
46 The following directive would be correct:
47
48 PerlSetVar soap_service "MyServer::WebService::WebServiceSoap"
49
50 transport_class [OPTIONAL]
51 Takes as a single argument the package name of the perl module
52 containing a handle() method used to assemble the HTTP request which
53 will be passed to the methods in your dispatch_to module (see above). A
54 default handle() method is supplied in this module which should handle
55 most common cases.
56
57 handle() is called with the following parameters:
58
59 $r - Apache::RequestRec object
60
62 The following snippet added to httpd.conf will enable a SOAP server at
63 /WebService on your webserver:
64
65 <Location /WebService>
66 SetHandler perl-script
67 PerlResponseHandler SOAP::WSDL::Server::Mod_Perl2
68 PerlSetVar dispatch_to "WebPackage::SOAPMethods"
69 PerlSetVar soap_service "MyServer::WebService::WebServiceSoap"
70 </Location>
71
73 On my machine, a simple SOAP server (the HelloWorld service from the
74 examples) needs around 20s to process 300 requests to a CGI script
75 implemented with SOAP::WSDL::Server::CGI, around 4.5s to the same CGI
76 with mod_perl enabled, and around 3.2s with
77 SOAP::WSDL::Server::Mod_Perl2. All these figures include the time for
78 creating the request and parsing the response.
79
80 As general advice, using mod_perl is highly recommended in high-
81 performance environments. Using SOAP::WSDL::Server::Mod_Perl2 yields an
82 extra 20% speedup compared with mod_perl enabled CGI scripts - and it
83 allows one to configure SOAP servers in the Apache config.
84
86 SOAP::WSDL uses Class::Std::Fast, which is not guaranteed to be
87 threadsafe yet. Thread safety in Class::Std::Fast is dependent on
88 whether
89
90 my $foo = $bar++;
91
92 is an atomic operation. I haven't found out yet.
93
94 A load test on a single CPU machine with 4 clients using the worker mpm
95 did not reveal any threading issues - but that does not mean there are
96 none.
97
99 Contributed (along with lots of other little improvements) by Noah
100 Robin.
101
102 Thanks!
103
105 This file is part of SOAP-WSDL. You may distribute/modify it under the
106 same terms as perl itself
107
109 Noah Robin <noah.robin gmail.com>
110
111 Based on SOAP::WSDL::Server::CGI, by Martin Kutter <martin.kutter
112 fen-net.de>
113
115 $Rev: 583 $
116 $LastChangedBy: kutterma $
117 $Id: $
118 $HeadURL: $
119
120
121
122perl v5.34.0 2022-01-21 SOAP::WSDL::Server::Mod_Perl2(3)