Hi,
i have already found a xindice based java gui. but it appears always a big
problem from the xupdate functions. If i tip some commands in and try to
execute them, it will appear an exception, this result from the example
http://xml.apache.org/xindice/guide-...er.html#N1025F are
extraordinarily similar:
*************** ******** Exception *************** *********
org.apache.xind ice.client.corb a.db.APIExcepti on:
IDL:org/apache/xindice/client/corba/db/APIException:1. 0
at
org.apache.xind ice.client.corb a.db.APIExcepti onHelper.read(A PIExceptionHelp e
r.java:112)
at
org.apache.xind ice.client.corb a.db._Collectio nStub.queryColl ection(_Collect i
onStub.java:833 )
at
org.apache.xind ice.client.xmld b.services.XUpd ateQueryService Impl.updateResu l
t(XUpdateQueryS erviceImpl.java :165)
at
org.apache.xind ice.client.xmld b.services.XUpd ateQueryService Impl.update(XUp d
ateQueryService Impl.java:185)
at XUpdate.main(XU pdate.java:41)
XML:DB Exception occured 1 Query Processing Error
*************** *************** *************** *************
*************** ***** Source Code *************** ***********
import org.xmldb.api.b ase.*;
import org.xmldb.api.m odules.*;
import org.xmldb.api.* ;
/**
* Simple XML:DB API example to update the database.
*/
public class XUpdate {
public static void main(String[] args) throws Exception {
Collection col = null;
try {
String driver = "org.apache.xin dice.client.xml db.DatabaseImpl ";
Class c = Class.forName(d river);
Database database = (Database) c.newInstance() ;
DatabaseManager .registerDataba se(database);
col =
DatabaseManager .getCollection( "xmldb:xind ice:///db/addressbook");
String xupdate = "<xu:modificati ons version=\"1.0\" " +
" xmlns:xu=\"http ://www.xmldb.org/xupdate\">" +
" <xu:remove select=\"/person/phone[@type = 'home']\"/>" +
" <xu:update select=\"/person/phone[@type = 'work']\">" +
" 480-300-3003" +
" </xu:update>" +
"</xu:modification s>";
XUpdateQuerySer vice service =
(XUpdateQuerySe rvice) col.getService( "XUpdateQuerySe rvice",
"1.0");
service.update( xupdate);
}
catch (XMLDBException e) {
System.err.prin tln("XML:DB Exception occured " + e.errorCode + " "
+
e.getMessage()) ;
}
finally {
if (col != null) {
col.close();
}
}
}
}
*************** *************** *************** *************
*************** **** Baum Struktur *************** *********
db
-addressbook
-address1 (XML Datei aus Xindice)
-address2 (XML Datei aus Xindice)
*************** *************** *************** *************
i have also tested another gui(from
http://titanium.dstc.edu.au/xml/xmld...eenshots.shtml) in different
versions of jre. but it appears the same problem. i'm not sure, whether it's
my problem or has xindice made sth wrong...
Thank you for your friendly help.