No. Because the action of a controller is mapped through an URL, and the
method of a XMLRPC-call is given as part of the request-body. And there
is no sensible way to map things onto each other.
> -- Can I use this with my existing controller methods.. that exposes
> json. ?
>
> @expose('json')
> foo()
> {
> ...
> }
You certainly can call a helper-method or function from both
implementations, thus not violating DRY-principles.
Diez
Not really possible, as you don't get a hold on the root-controller
easily. If any.
Instead, delegate to some common subclass, or a bunch of functions.
> -- Use some decorator similar to json for taking the return value and
> converting it to XML-RPC response? May be some method from XMLRPC
> Controller.
What conversion? JSON-decorated actions return dicts, XMLRPC groks dicts.
Diez