Perl Perl6 Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
RPC::XML - An implementation of XML-RPC Version: 0.54 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 firstname.lastname@example.org SEE ALSO XML-RPC: http://www.xmlrpc.com/spec The Artistic License: http://language.perl.com/misc/Artistic.html CHANGES Extended the $CLEAN list in Makefile.PL to also delete all *.ppd files. Also bumped the package version number to 0.54. Applied a patch from Tim Peoples that does three things: the 301 error code in RPC::XML::Procedure::call now includes signature info when a signature mismatch occurs. RPC::XML::smart_encode turns undef values into zero-length RPC::XML::string objects. Lastly, the RPC::XML::string::as_string method turns undef into null values as well. Small change to the XML character-escaping in RPC::XML::string's as_string method, so that a lookup-table is used. The same table is now used to escape keys in structs, as well. Added tests to cover this. This was suggested by Johnathan Kupferer. Made a small change for the sake of syntax pedantry to t/20_parse.t. Fix to the error-handling for a failed LWP::UserAgent->request call in RPC::XML::Client::send_request (thanks to Jasper Cramwinckel). Also got a small glitch covered in one of the calls to the inflate() method in Compress::Zlib. Thanks to John Tobing for that one. Dropped a regex-compare in favor of a string-compare for the special case of the XML tag being dateTime.iso8601. In some locales, the 'lc' caused problems. This is near RPC::XML::Parser line 288. Applied a patch to Apache::RPC::Server (supplied by Tim Peoples) to support "NoCompression" as a PerlSetVar directive, the function of which is to disable compression support upon demand. Fixed two minor typos in the Apache::RPC::Server docs, the names for two of the PerlSetVar directives. Added to the docs the fact that struct keys are now escaped. Also put some coverage in the docs on the two ways of initializing a struct object. Applied a patch from Chris Darroch to allow better handling of arguments in RPC::XML::Server::server_loop. While the HTTP::Daemon portion was fine with collapsing the arg list into a hash, the Net::Server portion actually has documented behavior when it sees the same argument more than once, and collapsing to a hash caused these extra arguments to be lost.