xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Once again: getting to run 1.1
Date Tue, 09 Sep 2003 12:06:09 GMT
Kai Woerner wrote:

> Thanks for the numerous answers!
>
> OK, CORBA is not in 1.1 anymore, I have to use 
> org.apache.xindice.client.xmldb.xmlrpc.DatabaseImpl in my Java, so 
> that something like...
>
> <CODE>
>
> import org.xmldb.api.DatabaseManager;
> import org.xmldb.api.base.Collection;
> import org.xmldb.api.base.Database;
> import org.xmldb.api.modules.CollectionManagementService;
>
> public class CreateCollection {
> public final static String URI = "xmldb:xindice://localhost:8080/";
> (...)
> String driver = "org.apache.xindice.client.xmldb.xmlrpc.DatabaseImpl";
> Class cl = Class.forName(driver);
> Database database = (Database) cl.newInstance();
> DatabaseManager.registerDatabase(database);
> Collection root = DatabaseManager.getCollection(URI + "/db");
> CollectionManagementService mgtService =(CollectionManagementService) 
> root.getService("CollectionManagementService", "1.0");
> Collection col = mgtService.createCollection("acollection");
> (...)
>
> </CODE>
> ...should work.
>
> Since I don't seem to get _anything_ to work, could someone paste me 
> some code that creates a collection in Xindice 1.1 under tomcat? Very, 
> very simple, no bells & whistles, just create a collection under the 
> root element. That would probably help a lot, since I now guess my 
> problem might as well lie elsewhere.


Take a look at the test suite. Work like this:

1) cvs checkout xml-xindice
2) build
3) xindice start
4) build test

Test suite has lots of functionality, including creation and deletion of 
numerous collections. It does this for xmlrpc, embed, and managed drivers.

Vadim



Mime
View raw message