
Catalyst::Model::JabberRPC - JabberRPC model class for Catalyst

# Model
__PACKAGE__->config(
server => 'myserver.org',
identauth => 'user:password',
endpoint => 'jrpc.myserver.org/rpc-server',
);
# Controller
sub default : Private {
my ($self, $c) = @_;
my $result;
eval {
$result = $c->model('RemoteService')->call('examples.getStateName', 5);
$c->stash->{value} = $result;
}
if ($@) {
...
}
...
};

This model class uses Jabber::RPC::Client to invoke remote procedure calls using XML-RPC calls over Jabber.

You can pass the same configuration fields as when you call Jabber::RPC::Client.

Take a look at Jabber::RPC::Client to see the method you can call.
Called from Catalyst.

This module will croak (die) if the execution of the remote proceduce failed, and also if the return message is a hashref which contain a key named faultString.

Jabber::RPC::Client, Catalyst::Model

Florian Merges, <fmerges@cpan.org>

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