RPC::XML - An implementation of XML-RPC

Version: 0.40

WHAT IS IT

The RPC::XML package is an implementation of XML-RPC. The module provides
classes for sample client and server implementations, a server designed as an
Apache location-handler, and a suite of data-manipulation classes that are
used by them.


USING RPC::XML

There are not any pre-packaged executables in this distribution (except for a
utility tool). Client usage will usually be along the lines of:

    use RPC::XML::Client;
    ...
    my $client = new RPC::XML::Client
        'http://www.oreillynet.com/meerkat/xml-rpc/server.php';
    my $req = RPC::XML::request->new('meerkat.getChannelsBySubstring', 'perl');
    my $res = $client->send_request($req);
    # This returns an object of the RPC::XML::response class. This double-call
    # of value() first gets a RPC::XML::* data object from the response, then
    # the actual data from it:
    my $value = $res->value->value;

Running a simple server is not much more involved:

    use RPC::XML::Server;
    ...
    my $srv = new RPC::XML::Server (host => 'localhost',
                                    port => 9000);
    # You would then use $srv->add_method to add some remotely-callable code
    ...
    $srv->accept_loop; # Stays in an accept/connect loop


BUILDING/INSTALLING

This package is set up to configure and build like a typical Perl extension.
To build:

        perl Makefile.PL
        make && make test

If RPC::XML passes all tests, then:

        make install

You may need super-user access to install.


PROBLEMS/BUG REPORTS

Please send any reports of problems or bugs to rjray@blackperl.com


SEE ALSO

XML-RPC:              http://www.xmlrpc.com/spec
The Artistic License: http://language.perl.com/misc/Artistic.html


CHANGES

Fixed some grammar problems in error messages, and some formatting.

Fixed a bug in the new() method of Apache::RPC::Server where it was
expecting the value of the "apache" key to be an object of the
Apache::Server class, but it was actually getting an object of the
Apache class.

Created RPC::XML::Function class, which is a type of server-side
encapsulator that doesn't bother with signature tests of any kind.
The DTD and make_method tool support the new type.

Changed the encoding of the Perl code in etc/make_method as follows:
If the code does not already contain either of the two sequences,
']]>' or '__DATA__', then the code is wrapped in a <![CDATA[ ]]>
section, with #!/usr/bin/perl (actually, $Config{startperl}) at the
head and __DATA__ at the end. Besides leaving the Perl code readable,
the *.xpl files can now be syntax-checked with "perl -cx". Thanks to
the mod_perl guys for this idea, cribbed from their manual page.

Abstracted some of the invocation code out of the server class and
into the RPC::XML::Procedure class, where it really belonged. This
aided in further eliminating redundancy in the server class in the
same general area. I may yet want to tune this area, but I'm a good
deal happier with the reduction in complexity and repetition.
