1Apache::XMLRPC(3)     User Contributed Perl Documentation    Apache::XMLRPC(3)
2
3
4

NAME

6       Apache::XMLRPC - serve XML-RPC requests from Apache
7

SYNOPSIS

9          ##
10          ##  Directives for your Apache config file.
11          ##
12          <Location /RPC2>
13             SetHandler perl-script
14             PerlHandler Apache::XMLRPC
15             PerlSetVar XMLRPC_Config /usr/local/apache/xml-rpc/services
16          </Location>
17
18          ##
19          ##  In the 'services' file referenced above by 'XMLRPC_Config'
20          ##
21          sub foo {
22             ...
23          }
24
25          sub bar {
26             ...
27          }
28
29          $map = {
30             foo   => \&foo,
31             bar   => \&bar,
32          };
33
34          1;
35

DESCRIPTION

37       Apache::XMLRPC serves Userland XML-RPC requests from Apache/mod_perl
38       using the Frontier::RPC2 module.
39
40       Configuring Apache::XMLRPC to work under mod_perl is a two step
41       process.  First, you must declare a "<Location>" directive in your
42       Apache configuration file which tells Apache to use the content handler
43       found in the Apache::XMLRPC module and defines a variable which tells
44       the module where to find your services.  Then, you must define the ser‐
45       vices.
46
47       Apache Configuration
48
49       Apache configuration is as simple as the "<Location>" directive shown
50       in the synopsis above.  Any directive allowed by Apache inside a
51       "<Location>" block is allowed here, but the three lines shown above are
52       required.  Pay close attention to the 'PerlSetVar XMLRPC_Config ...'
53       line as this is where you tell Apache where to find your services.
54       This file may reside anywhere accessable by Apache.
55
56       Defining Services
57
58       To actually define the XML-RPC routines that will be served, they must
59       reside in the file referenced by the 'PerlSetVar XMLRPC_Config ...'
60       directive in the Apache configuration file.  In this file you may place
61       as many Perl subroutines as you like, but only those which are explic‐
62       itly published will be available to your XML-RPC clients.
63
64       To publish a subroutine, it must be included in the hash reference
65       named $map (the hash reference must have this name as this is the vari‐
66       able that the Apache::XMLRPC passes to Frontier::RPC2::serve to actu‐
67       ally service each request) The hash reference must be defined in this
68       "services" file.
69
70       The keys of the hash are the service names visible to the XML-RPC
71       clients while the hash values are references to the subroutines you
72       wish to make public.  There is no requirement that the published ser‐
73       vice names match those of their associated subroutines, but it does
74       make administration a little easier.
75

SEE ALSO

77       perl(1), Frontier::RPC2(3)
78
79       <http://www.scripting.com/frontier5/xml/code/rpc.html>
80

AUTHOR

82       Ed Hill <ed-hill@uiowa.edu> is the original author.
83
84       Tim Peoples <tep@colltech.com> added a few tweaks and all the documena‐
85       tion.
86
87
88
89perl v5.8.8                       2002-08-02                 Apache::XMLRPC(3)
Impressum