POE::Component::Server::SimpleXMLRPC
XML-RPC server based on SimpleHTTP and Frontier::RPC2.
Dispatches incoming requests to CODEREF handlers, using RPC_MAP.
Each request is processed in separate Wheel::Run process, so it
is fork-on-demand model.
use POE qw(Component::Server::SimpleXMLRPC Component::Logger); POE::Component::Logger->spawn( ConfigFile => 'external_config_file' ); POE::Component::Server::SimpleXMLRPC->new( PORT => 5555, ADDRESS => '127.0.0.1', RPC_MAP => { test => sub { return { res => 'test ok:' } }, ALIAS => 'HTTPD', RECV_SESSION => 'HTTP_GET', LOGGER => { SESSION => 'logger', EVENT => 'log' } ); $poe_kernel->run();
Look at the example folder for simple example of client and server scripts.
Takes usual options hash, as Po::Co::Server::SimpleHTTP does,
but with few additions.
Optional. Server session alias. Defaulted to 'HTTPD'.
Optional. Controller session alias. Defaulted to 'HTTP_GET'.
Optional. Max time for request processing, in seconds. Defaulted to 120.
Required. HashRef of procedures names and their CodeRefs.
Optional. HashRef with SESSION and EVENT names of logger session.
No default logger will be created.
All other options are passed to SimpleHTTP constructor.
Internal Simple parser of incoming xml.
Server session is a SimpleHTTP server, so refer to it's documentation.
Controller session events:
Internal Main controller session. Parses request, starts wheel::run,
tries to handle errors.
Public Changes RPC_MAP. The only argument must be the same as RPC_MAP -
HashRef of procedures and their CodeRef.
Should be. Use rt to report.
Tests do not cover all abilities and possible points of failures.
It tests only basic functionality.
Denis Pokataev aka Catone. 2008.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install POE::Component::Server::SimpleXMLRPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::Server::SimpleXMLRPC
CPAN shell
perl -MCPAN -e shell install POE::Component::Server::SimpleXMLRPC
For more information on module installation, please visit the detailed CPAN module installation guide.