1# ======================================================================
2#
3# Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com)
4# SOAP::Lite is free software; you can redistribute it
5# and/or modify it under the same terms as Perl itself.
6#
7# $Id: Lite.pm 414 2012-07-15 09:18:42Z kutterma $
8#
9# ======================================================================
10
11package Apache::XMLRPC::Lite;
12
13use strict;
14use vars qw(@ISA $VERSION);
15use XMLRPC::Transport::HTTP;
16
17@ISA = qw(XMLRPC::Transport::HTTP::Apache);
18
19our $VERSION = 0.715;
20
21my $server = __PACKAGE__->new;
22
23sub server {
24    return $server;
25}
26
27sub handler {
28  $server->configure(@_);
29  $server->SUPER::handler(@_);
30}
31
32# ======================================================================
33
341;
35
36__END__
37
38=head1 NAME
39
40Apache::XMLRPC::Lite - mod_perl-based XML-RPC server with minimum configuration
41
42=head1 SYNOPSIS
43
44=over 4
45
46=item httpd.conf (Location), directory-based access
47
48  <Location /mod_xmlrpc>
49    SetHandler perl-script
50    PerlHandler Apache::XMLRPC::Lite
51    PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
52    PerlSetVar options "compress_threshold => 10000"
53  </Location>
54
55=item httpd.conf (Files), file-based access
56
57  <FilesMatch "\.xmlrpc$">
58    SetHandler perl-script
59    PerlHandler Apache::XMLRPC::Lite
60    PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
61    PerlSetVar options "compress_threshold => 10000"
62  </FilesMatch>
63
64=item .htaccess, directory-based access
65
66  SetHandler perl-script
67  PerlHandler Apache::XMLRPC::Lite
68  PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
69  PerlSetVar options "compress_threshold => 10000"
70
71=back
72
73=head1 DESCRIPTION
74
75This Apache Perl module provides the ability to add support for XML-RPC
76protocol with easy configuration (either in .conf or in .htaccess file).
77This functionality should give you lightweight option
78for hosting SOAP services and greatly simplify configuration aspects. This
79module inherites functionality from XMLRPC::Transport::HTTP::Apache component
80of XMLRPC::Lite module.
81
82=head1 CONFIGURATION
83
84The module can be placed in <Location>, <Directory>, <Files>, <FilesMatch>
85directives in main server configuration areas or directly in .htaccess file.
86
87All parameters should be quoted and can be separated with commas or spaces
88for lists ("a, b, c") and with 'wide arrows' and commas for hash parameters
89("key1 => value1, key2 => value2").
90
91All options that you can find in XMLRPC::Transport::HTTP::Apache component
92are available for configuration. Here is the description of most important
93ones.
94
95=over 4
96
97=item dispatch_to (LIST)
98
99Specifies path to directory that contains Perl modules you'd like to give
100access to, or just list of modules (for preloaded modules).
101
102  PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method"
103
104=item options (HASH)
105
106Specifies list of options for your module, for example threshold for
107compression. Future versions will support more options. See
108XMLRPC::Transport::HTTP documentation for other options.
109
110  PerlSetVar options "compress_threshold => 10000"
111
112=back
113
114=head1 METHODS/SUBROUTINES
115
116=head2 server
117
118 my $server = Apache::XMLRPC::Lite->server();
119
120Returns the server object.
121
122Useful if you need to manipulate the server object from your code.
123
124=head2 handle
125
126Request handler. Called by apache.
127
128=head1 DEPENDENCIES
129
130 XMLRPC::Lite
131 mod_perl
132
133=head1 SEE ALSO
134
135 XMLRPC::Transport::HTTP::Apache for implementation details,
136 XMLRPC::Lite for general information, and
137 F<examples/server/mod_xmlrpc.htaccess> for .htaccess example
138
139=head1 COPYRIGHT
140
141Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.
142
143This library is free software; you can redistribute it and/or modify
144it under the same terms as Perl itself.
145
146=head1 AUTHOR
147
148Paul Kulchenko (paulclinger@yahoo.com)
149
150=cut
151