A Perl implementation of the XML-RPC specification
Fetching latest commit…
Cannot retrieve the latest commit at this time
RPC::XML - An implementation of XML-RPC Version: 0.65 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 email@example.com SEE ALSO XML-RPC: http://www.xmlrpc.com/spec The Artistic 2.0: http://www.opensource.org/licenses/artistic-license-2.0.php The LGPL 2.1: http://www.opensource.org/licenses/lgpl-2.1.php CHANGES * etc/make_method * etc/rpc-method.dtd * lib/RPC/XML/Procedure.pm * t/30_method.t * t/35_namespaces.t (added) * t/namespace1.xpl (added) * t/namespace2.xpl (added) * t/namespace3.xpl (added) Support for declaration of namespaces in XPL code. Adds a new test suite and includes a rewrite/update of the method tests. Change also covers the make_method tool and the DTD for XPL files. * lib/RPC/XML.pm * lib/RPC/XML/Client.pm * lib/RPC/XML/Server.pm * t/02_pod_coverage.t Interim fix for encoding issues, prior to the mega-encoding work. This makes the library correctly create octet-based messages, rather than letting UTF-8 leak in if it was passed in initially. * lib/Apache/RPC/Server.pm * lib/RPC/XML.pm * lib/RPC/XML/Client.pm Follow-up to previous commit, some serialization-related problems. Not all instances of bytelength() had been removed after the previous slate of changes, and once that was done some tests in 15_serialize.t broke. * lib/RPC/XML.pm * lib/RPC/XML/Parser.pm * t/12_nil.t (added) * t/30_method.t RT #34132: Based on a patch from the requestor, added support for <nil/>. Documentation and tests are present, but a little sparse. This change also incorporates a small add to lib/RPC/XML/Parser.pm to address RT #42033. * t/40_server.t * t/41_server_hang.t RT #27778: Fix problems with child-process management on Windows that was causing t/40_server.t to hang during test runs. Also put skip-clause into t/41_server_hang.t, as according to the person reporting, it doesn't work at all on MSWin (the network code is very UNIX-y). * lib/RPC/XML.pm * t/10_data.t Applied a regexp-fix from Joakim Mared for stringification of doubles. * lib/RPC/XML.pm * lib/RPC/XML/Client.pm * lib/RPC/XML/Parser.pm * lib/RPC/XML/Procedure.pm * lib/RPC/XML/Server.pm * t/10_data.t RT ticket #35106: Make the behavior of RPC::XML::array constructor work as expected. This led to adding use of Scalar::Util and cleaning up the places where I was still doing "UNIVERSAL::isa(...)" hacks to test refs without the risk of directly calling ->isa() on a potentially-unblessed ref. * lib/Apache/RPC/Server.pm * lib/Apache/RPC/Status.pm * lib/RPC/XML.pm * lib/RPC/XML/Client.pm * lib/RPC/XML/Function.pm * lib/RPC/XML/Method.pm * lib/RPC/XML/Parser.pm * lib/RPC/XML/Procedure.pm * lib/RPC/XML/Server.pm Update the copyright year and license information, and add contact data to all POD sections for RT, AnnoCPAN, GitHub, etc. * lib/RPC/XML/Client.pm * t/50_client.t RT ticket #34559: Allow control of LWP::UA timeouts from within client class. * lib/RPC/XML/Server.pm RT ticket #43019: Small hack to the existing SSL hack for Socket6 problems. * lib/Apache/RPC/Server.pm * lib/Apache/RPC/Status.pm * lib/RPC/XML.pm * lib/RPC/XML/Client.pm * lib/RPC/XML/Function.pm * lib/RPC/XML/Method.pm * lib/RPC/XML/Parser.pm * lib/RPC/XML/Procedure.pm * lib/RPC/XML/Server.pm Since Scalar::Util requires 5.006, make that (5.006001, actually) the base required Perl version.