NAME

POE::Component::Server::SimpleXMLRPC

DESCRIPTION

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.

SYNOPSIS

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.

METHODS

new

Takes usual options hash, as Po::Co::Server::SimpleHTTP does,

but with few additions.

ALIAS

Optional. Server session alias. Defaulted to 'HTTPD'.

RECV_SESSION

Optional. Controller session alias. Defaulted to 'HTTP_GET'.

FUNC_TIMEOUT

Optional. Max time for request processing, in seconds. Defaulted to 120.

RPC_MAP

Required. HashRef of procedures names and their CodeRefs.

LOGGER

Optional. HashRef with SESSION and EVENT names of logger session.

No default logger will be created.

All other options are passed to SimpleHTTP constructor.

_getParamsFromRequest

Internal Simple parser of incoming xml.

EVENTS

Server session is a SimpleHTTP server, so refer to it's documentation.

Controller session events:

GOT_default

Internal Main controller session. Parses request, starts wheel::run,

tries to handle errors.

remap

Public Changes RPC_MAP. The only argument must be the same as RPC_MAP -

HashRef of procedures and their CodeRef.

BUGS

Should be. Use rt to report.

Tests do not cover all abilities and possible points of failures.

It tests only basic functionality.

AUTHOR

Denis Pokataev aka Catone. 2008.

COPYRIGHTS

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.