| 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 249 2008-05-05 20:35:05Z kutterma $ |
|---|
| 8 | # |
|---|
| 9 | # ====================================================================== |
|---|
| 10 | |
|---|
| 11 | package Apache::XMLRPC::Lite; |
|---|
| 12 | |
|---|
| 13 | use strict; |
|---|
| 14 | use vars qw(@ISA $VERSION); |
|---|
| 15 | use XMLRPC::Transport::HTTP; |
|---|
| 16 | |
|---|
| 17 | @ISA = qw(XMLRPC::Transport::HTTP::Apache); |
|---|
| 18 | #$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name$ =~ /-(\d+)_([\d_]+)/); |
|---|
| 19 | use version; $VERSION = qv('0.710.05'); |
|---|
| 20 | |
|---|
| 21 | my $server = __PACKAGE__->new; |
|---|
| 22 | |
|---|
| 23 | sub server { |
|---|
| 24 | return $server; |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | sub handler { |
|---|
| 28 | $server->configure(@_); |
|---|
| 29 | $server->SUPER::handler(@_); |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | # ====================================================================== |
|---|
| 33 | |
|---|
| 34 | 1; |
|---|
| 35 | |
|---|
| 36 | __END__ |
|---|
| 37 | |
|---|
| 38 | =head1 NAME |
|---|
| 39 | |
|---|
| 40 | Apache::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 | |
|---|
| 75 | This Apache Perl module provides the ability to add support for XML-RPC |
|---|
| 76 | protocol with easy configuration (either in .conf or in .htaccess file). |
|---|
| 77 | This functionality should give you lightweight option |
|---|
| 78 | for hosting SOAP services and greatly simplify configuration aspects. This |
|---|
| 79 | module inherites functionality from XMLRPC::Transport::HTTP::Apache component |
|---|
| 80 | of XMLRPC::Lite module. |
|---|
| 81 | |
|---|
| 82 | =head1 CONFIGURATION |
|---|
| 83 | |
|---|
| 84 | The module can be placed in <Location>, <Directory>, <Files>, <FilesMatch> |
|---|
| 85 | directives in main server configuration areas or directly in .htaccess file. |
|---|
| 86 | |
|---|
| 87 | All parameters should be quoted and can be separated with commas or spaces |
|---|
| 88 | for lists ("a, b, c") and with 'wide arrows' and commas for hash parameters |
|---|
| 89 | ("key1 => value1, key2 => value2"). |
|---|
| 90 | |
|---|
| 91 | All options that you can find in XMLRPC::Transport::HTTP::Apache component |
|---|
| 92 | are available for configuration. Here is the description of most important |
|---|
| 93 | ones. |
|---|
| 94 | |
|---|
| 95 | =over 4 |
|---|
| 96 | |
|---|
| 97 | =item dispatch_to (LIST) |
|---|
| 98 | |
|---|
| 99 | Specifies path to directory that contains Perl modules you'd like to give |
|---|
| 100 | access 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 | |
|---|
| 106 | Specifies list of options for your module, for example threshold for |
|---|
| 107 | compression. Future versions will support more options. See |
|---|
| 108 | XMLRPC::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 | |
|---|
| 120 | Returns the server object. |
|---|
| 121 | |
|---|
| 122 | Useful if you need to manipulate the server object from your code. |
|---|
| 123 | |
|---|
| 124 | =head2 handle |
|---|
| 125 | |
|---|
| 126 | Request 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 | |
|---|
| 141 | Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved. |
|---|
| 142 | |
|---|
| 143 | This library is free software; you can redistribute it and/or modify |
|---|
| 144 | it under the same terms as Perl itself. |
|---|
| 145 | |
|---|
| 146 | =head1 AUTHOR |
|---|
| 147 | |
|---|
| 148 | Paul Kulchenko (paulclinger@yahoo.com) |
|---|
| 149 | |
|---|
| 150 | =cut |
|---|