I should be doing other things, but I've been setting up a public
Jabber-RPC responder, and HTTPgate, on our machine, so people can
test against it (more on that in another post later) and I couldn't
resist trying it out.
From my laptop (cicero) downstairs, I ran a Jabber-RPC client that
connected itself to a Jabber server on my gateway (qmacro), and sent
a Jabber-RPC request via the HTTPgate on our public host (gnu)
gateway to validator.userland.com's HTTP-based XML-RPC responder, and
called a couple of getState* procedures ... successfully!
For the interested, here are a few relevant snippets:
use Jabber::RPC::Client;
my $client = new Jabber::RPC::Client(
server => 'qmacro.xxxxx.xxx',
identauth => 'dj:secret',
)
$client->endpoint
('jrpchttp.gnu.xxxxx.xxx/http://validator.userland.com:80/RPC2');
$result = $client->call('examples.getStateStruct',
{ state1 => 18, state2 => 27, state3 => 48 } );
print "getStateStruct: ", $result || $client->lastfault, "\n";
$result = $client->call('examples.getStateName', 1);
print "getStateName: ", $result || $client->lastfault, "\n";
[dj@cicero examples]$ ./jrpc-requester.pl
getStateStruct: Louisiana,Nebraska,West Virginia
getStateName: Alabama
[dj@cicero examples]$
(I've only xxxx'd out the server names 'cos I'm not quite ready with
the public testing service yet)
cheerio for now
dj