NAME

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

SYNOPSIS

 # 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 ($@) {
        ...
    }
    ...
 };

DESCRIPTION

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

CONFIGURATION

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

METHODS

General

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

new

Called from Catalyst.

NOTES

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.

SEE ALSO

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

AUTHOR

Florian Merges, <fmerges@cpan.org>

LICENSE

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