[xwiki-dev] [Proposal] New generic Action for calling an API and returning the result as XML

Sergiu Dumitriu sergiu.dumitriu at gmail.com
Wed Jun 13 00:48:49 CEST 2007


-0.25

I'm not sure we need such a general action. OK, there are some use
cases, but should we allow calling any public method in the API? Then
why not doing something better, and write a SOAP wrapper for the API,
or reuse the XMLRPC one?

On 6/11/07, Vincent Massol <vincent at massol.net> wrote:
> I talked briefly to ludovic and he says we could reuse our GWT API.
> We would need some wrappers in order to be able to call it directly
> (for the serialization for example). That would allow us to focus on
> having one AJAX API.
>
> -Vincent
>
> On Jun 11, 2007, at 3:35 PM, Vincent Massol wrote:
>
> > Hi,
> >
> > I'm writing a treeview (using the yahoo treeview javascript api) to
> > display the list of all pages of a wiki and in order to have good
> > performances I need to call a server-side method for getting all
> > children pages of a given page (so that the nodes or the treeview
> > are loaded dynamically). In order to implement this I thus need a
> > new XWiki Action.
> >
> > Now I think it would be good to generalize this common need. As we
> > add more Ajax to our UIs we'll need more and more calls from JS to
> > the server side.
> >
> > I'm thus proposing a generic ExecuteXMLAction (or AjaxAction or
> > another name) that would do the following:
> >
> > * Get the class, method and parameter to execute from the HTTP request
> > * Verify that the class is in the api package (to prevent security
> > issues)
> > * Call the method using introspection
> > * Return the result as XML using XStream (it generates
> > automatically XML from any java object)
> >
> > Note: I'd need to define the format for sending the information in
> > the request. Not sure about which format to use.
> >
> > WDYT?
> >
> > Thanks
> > -Vincent
> >
> >
> >
> > --
> > You receive this message as a subscriber of the xwiki-
> > dev at objectweb.org mailing list.
> > To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> > For general help: mailto:sympa at objectweb.org?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/
> > wws

Sergiu
-- 
http://purl.org/net/sergiu




More information about the devs mailing list