blob: 3fa63aa5604c877a916e811e797053c7ec9ba62e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/perl -w
use strict;
use Carp;
use XML::RPC;
use MyCGI;
use OpenSim::Utility;
use OpenSim::UserServer;
my $param = &MyCGI::getParam();
my $request = $param->{'POSTDATA'};
&OpenSim::Utility::Log("user", "request", $request);
my $xmlrpc = new XML::RPC();
my $response = $xmlrpc->receive($request, \&XMLRPCHandler);
&OpenSim::Utility::Log("user", "response", $response);
&MyCGI::outputXml("utf-8", $response);
sub XMLRPCHandler {
my ($methodname, @param) = @_;
my $handler_list = &OpenSim::UserServer::getHandlerList();
if (!$handler_list->{$methodname}) {
Carp::croak("?");
} else {
my $handler = $handler_list->{$methodname};
$handler->(@param);
}
}
|