[Catalyst] Help with XMLRPC
Jon
jon+catalyst at youramigo.com
Fri Feb 16 21:53:56 GMT 2007
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/
More information about the Catalyst
mailing list