[Catalyst] Help with XMLRPC
Patricio A. Bruna
pbruna at it-linux.cl
Sat Feb 17 00:57:32 GMT 2007
I found another way.
>From the XMLRPC "client" i had to call the function like: api.add
Any good read on how to make a little client to see the response from the XMLRPC server and...
how can i make the response be a XML data chunk?
----- Mensaje Original -----
De: "Jon" <jon+catalyst at youramigo.com>
Para: "The elegant MVC web framework" <catalyst at lists.rawmode.org>
Enviados: viernes 16 de febrero de 2007 18H53 (GMT-0400) America/Santiago
Asunto: Re: [Catalyst] Help with XMLRPC
I had to declare all my subs like this:
sub add : XMLRPC('add') {
...
}
Without explicitly appending ('add'), it wouldn't work... which is not
what the pod says.
HTH.
--
Jon
On Fri, 2007-02-16 at 10:53 -0300, Patricio A. Bruna wrote:
> im trying to start with Catalyst::Plugin::XMLRPC but im having not results
>
> my lib/soap/Controller/API.pm has:
>
> ---- snip ----
> sub default : Private {
> my ( $self, $c ) = @_;
> $c->xmlrpc;
> }
>
>
> sub add : XMLRPC {
> my ( $self, $c, $a, $b) = @_;
> return $a + $b;
> }
> ----- snip ----
>
> I have added the plugin to lib/soap.pm
>
> when i try i get:
>
> 10:54 pbruna:~> XMLRPCsh.pl http://localhost:3000/api
> Usage: method[(parameters)]
> > add(1,2)
> --- XMLRPC FAULT ---
> -2
> No response for request
>
> and the debug screen says:
>
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] **********************************
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] * Request 1 (0.111/s) [7569]
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] **********************************
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] "POST" request for "api" from "127.0.0.1"
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] Arguments are "api"
> [Fri Feb 16 10:54:45 2007] [catalyst] [debug] XMLRPC request for "add"
> [Fri Feb 16 10:54:45 2007] [catalyst] [info] Request took 0.039918s (25.051/s)
> .------------------------------------------------------------------+-----------.
> | Action | Time |
> +------------------------------------------------------------------+-----------+
> | /api/default | 0.000004s |
> '------------------------------------------------------------------+-----------'
>
> any ideas?
>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst
mailing list