You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by xi...@xml.apache.org on 2004/06/25 03:28:15 UTC
[Xindice Wiki] Updated: BasicAuthentication
Date: 2004-06-24T18:28:15
Editor: 150.203.2.85 <>
Wiki: Xindice Wiki
Page: BasicAuthentication
URL: http://wiki.apache.org/xindice/BasicAuthentication
no comment
Change Log:
------------------------------------------------------------------------------
@@ -88,6 +88,19 @@
Or programmatically:
{{{
- driver.setProperty(DatabaseImpl.PROP_XMLRPC_USER, "xindice");
- driver.setProperty(DatabaseImpl.PROP_XMLRPC_PASSWORD, "manager");
+ String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
+ Class c = Class.forName(driver);
+
+ Database database = (Database)c.newInstance();
+
+ database.setProperty("xmlrpc-user", "xindice");
+ database.setProperty("xmlrpc-password", "manager");
+
+ DatabaseManager.registerDatabase(database);
+
+ String uri = "xmldb:xindice://localhost:8080/db";
+
+ Collection col = DatabaseManager.getCollection(uri);
}}}
+
+[Note: If the above does not work with xindice-1.1b4, try pulling xindice-1.1b5 from source and building that. Make sure that you have the latest required .jar files in your classpath or jre/lib/endorsed directory.]