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