1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
mod_xmlrpc2 - Module for Apache2 that provides an XMLRPC server
mod_xmlrpc2 implements an XMLRPC server within Apache, as a handler.
XMLRPC server methods are handled in loadable shared binaries (in C)
or in interpreted scripts (in Ruby).
In order to enable it, simply do something like:
<Location /xmlrpc>
SetHandler xml-rpc
</Location>
This tells apache to use the XMLRPC handler for all requests to
/xmlrpc. Server methods may be implemented in C or Ruby.
** C SERVER METHODS **
To specify a directory that shared objects should be loaded
from, use:
XMLRPCServerPath /lib/modules/xmlrpc-server
All shared objects in /lib/modules/xmlrpc-server will be
loaded, and if a structure named `mod_xmlrpc_register' exists, it will
be used to load XMLRPC server methods. Server methods should take and
return the same args that a normal libxmlrpc-c server method would
take and return (see xmlrpc-c's overview.txt for information on how
xmlrpc functions should be written). Examples modules are provided
in the examples subdirectory.
** RUBY SERVER METHODS **
To specify a directory that Ruby scripts should be loaded from, use:
XMLRPCServerPathRuby /usr/lib/mod-xmlrpc-ruby
All ruby scripts in /usr/lib/mod-xmlrpc-ruby will be loaded, and
any classes within the ModXMLRPC namespace will be exported. For
example, the following would be accessible as 'int Foo.bar(int a)':
module ModXMLRPC
class Foo
FOO_BAR_SIG = 'i:i'
FOO_BAR_HELP = 'This method takes and returns a number.'
def Foo.bar(a)
a += 5
return a
end
end
end
Andres Salomon <dilinger@voxel.net> Fri, 23 Jul 2004 20:00:53 -0400
|