Hi Alex, Congrats! This is VERY nice. While looking at your code, several questions came to mind:
1) In the samples you seem to only use the local eXist URIs. Does your eXist client connector support remote access to an eXist database (by specifying a host name and port number)? 2) For your XMLDBApplication, did you consider relying on the Redirector class instead of XMLDBFinder/XMLDBResource in order to convert calls from the server HTTP connector to your client eXist connector? That would be more efficient Best regards, Jerome > -----Message d'origine----- > De : James Todd [mailto:[EMAIL PROTECTED] > Envoyé : mardi 3 avril 2007 01:31 > À : [email protected] > Objet : Re: eXist / Restlet Integration > > > very cool! > > - james > > > On 4/2/07, Alex Milowski <[EMAIL PROTECTED]> wrote: > > I've just finished integrating eXist (an XML database) with > the Restlet API. Now you can use the Client API to access > an embedded eXist database via GET/POST/etc. > > The code is located at: > > > https://exist.svn.sourceforge.net/svnroot/exist/trunk/restlet > <https://exist.svn.sourceforge.net/svnroot/exist/trunk/restlet> > > and to build it you need: > > > https://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist-1.0 > https://exist.svn.sourceforge.net/svnroot/exist/trunk/embedded > > https://exist.svn.sourceforge.net/svnroot/exist/trunk/restlet > <https://exist.svn.sourceforge.net/svnroot/exist/trunk/restlet> > > Then do: > > cd eXist-1.0; ant; cd .. > cd embedded; ant import-exist; ant jar; cd .. > cd restlet; ant jar > > You can then run the example via: > > java -jar dist/exist-restlet.jar localhost localhost > 8080 conf.xml > > The neat bit here is that you can now write: > > Client client = new Client(Protocol.valueOf("exist")); > client.get("exist:///foo.xml").getEntity().write( System.out); > > to get a document out of eXist or post a query via: > > Client client = new Client(Protocol.valueOf("exist")); > Response r = client.post(new Reference("exist:///foo.xml"), > new StringRepresentation( > > "<target>{/document/section}</target>", > > MediaType.valueOf("application/xquery")) ); > > --Alex Milowski > > > >

