1Catalyst::Model::XMLRPCU(s3e)r Contributed Perl DocumentaCtaitoanlyst::Model::XMLRPC(3)
2
3
4
6 Catalyst::Model::XMLRPC - XMLRPC model class for Catalyst
7
9 # Model
10 __PACKAGE__->config(
11 location => 'http://webservice.example.com:9000',
12 );
13
14 # Controller
15 sub default : Private {
16 my ($self, $c) = @_;
17
18 my $res;
19
20 eval {
21 $res = $c->model('RemoteService')->send_request('system.listMethods');
22 $c->stash->{value} = $res->value;
23 };
24 if ($@) {
25 # Something went wrong...
26 }
27
28 ...
29 };
30
32 This model class uses RPC::XML::Client to invoke remote procedure calls
33 using XML-RPC.
34
36 You can pass the same configuration fields as when you call
37 RPC::XML::Client, the only special thing is that the URI is provided
38 via the location field.
39
41 General
42 Take a look at RPC::XML::Client to see the method you can call.
43
44 new
45 Called from Catalyst.
46
48 By default, there is an error_handler and a fault_handler provided for
49 the RPC::XML::Client object that call Carp::croak. You can override it
50 if you want via the config call.
51
53 Must provide an location
54 You'll get this error, if you haven't provided a location. See Config.
55
56 Can't create RPC::XML::Client object
57 Something went wrong while trying to create an RPC::XML::Client object.
58 See documentation of this module for further references.
59
61 ·
62 RPC::XML::Client
63
64 ·
65 RPC::XML
66
67 ·
68 Catalyst::Model
69
71 ·
72 Daniel Westermann-Clark's module, Catalyst::Model::LDAP, it was my
73 reference.
74
75 ·
76 Lee Aylward, for reporting the issue regarding v.0.03.
77
79 Florian Merges, <fmerges@cpan.org>
80
82 This library is free software; you can redistribute it and/or modify it
83 under the same terms as Perl itself.
84
85
86
87perl v5.30.0 2019-07-26 Catalyst::Model::XMLRPC(3)