You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by "R. Mark Volkmann" <ma...@ociweb.com> on 2005/01/04 15:39:48 UTC

XML:DB Initiative and Xindice activity

I'm just getting started with Xindice.

Should I be troubled by the fact that http://www.xmldb.org leads to a page that
says "Coming Soon!"?  Is the XML:DB initiative active?

For that matter, is development of Xindice still active?  It appears that the
last release was on April 9, 2004.

--
R. Mark Volkmann
Partner, Object Computing, Inc.

RE: XUpdate to add a document to a collection

Posted by Hanifa Mohammed <ma...@yahoo.com>.
hi 
 
we can add the document through java
in xindice example we have the java file "addDocument.jaa" 
we have to change the URI, then we can add the document
 
here is the code
 

package com.celestials.dao.db.services;

/*

* Created on Dec 6, 2004

*

* TODO To change the template for this generated file go to

* Window - Preferences - Java - Code Generation - Code and Comments

*/

import java.io.File;

import java.io.FileInputStream;

import org.xmldb.api.base.Collection;

import org.xmldb.api.base.XMLDBException;

import org.xmldb.api.modules.XMLResource;

/**

* @author Hanif

*

* TODO To change the template for this generated type comment go to

* Window - Preferences - Java - Code Generation - Code and Comments

*/

/**

* Simple XML:DB API Example to insert a new document into the database.

*/

public class AddDocument extends AbstractExample {



public static void main(String[] args) throws Exception {

Collection collection = null;

try {

collection = getCollection("xmldb:xindice://localhost:8080/db/efiler");



String args0 = null;



System.out.println(args.length);



if(args.length==0) {

args0 = "c:/Project.xml"; 

} else {

args0 = args[0];

}

String data = readFileFromDisk(args0);



XMLResource document = (XMLResource) collection.createResource(null, "XMLResource");

document.setContent(data);

// document.setContentAsSAX();

collection.storeResource(document);

System.out.println("Document " + args0 + " inserted as " + document.getId());

}

catch (XMLDBException e) {

System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());

}

finally {

if (collection != null) {

collection.close();

}

}

}

public static String readFileFromDisk(String fileName) throws Exception {

File file = new File(fileName);

System.err.println(file.exists());

FileInputStream insr = new FileInputStream(file);

byte[] fileBuffer = new byte[(int) file.length()];

insr.read(fileBuffer);

insr.close();

return new String(fileBuffer);

}

}
urs
hanif

"R. Mark Volkmann" <ma...@ociweb.com> wrote:
Quoting Ф ���� 
:

> If you use xindice 1.0, you'd try it with xindice 1.1!

I'm using 1.1b4 and it doesn't work. Has anyone else been able to add documents
to a collection from Java? If so, can you send me an example?

> >From: "R. Mark Volkmann" 
> >Reply-To: xindice-users@xml.apache.org
> >To: xindice-users@xml.apache.org
> >Subject: XUpdate to add a document to a collection
> >Date: Tue, 4 Jan 2005 10:47:11 -0600
> >
> >I need to add a document to a collection from a Java application. I'm
> trying to
> >do this using the XUpdate API. Is this the best way?
> >
> >Here is the xupdate string I'm passing to my XUpdateQueryService update
> method.
> >
> >
> > 
> > 
> > foo
> > bar
> > 
> > 
> >
> >
> >It fails with the following stack trace.
> >
> >org.xmldb.api.base.XMLDBException: org.apache.xmlrpc.XmlRpcException:
> Error
> >Compiling XPath Expression: null
> > at
>
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:119)
>
> > at
>
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:515)
>
> > at
>
>org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)
>
> > at
>
>org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)
>
> > at
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:81)
>
> >
> >Any suggestions would be greatly appreciated!
> >
> >--
> >R. Mark Volkmann
> >Partner, Object Computing, Inc.
>
> _________________________________________________________________
> �������������ĵ����ʼ�ϵͳ�� MSN Hotmail�� http://www.hotmail.com
>
>


--
R. Mark Volkmann
Partner, Object Computing, Inc
		
---------------------------------
Do you Yahoo!?
 Take Yahoo! Mail with you! Get it on your mobile phone.

RE: XUpdate to add a document to a collection

Posted by "R. Mark Volkmann" <ma...@ociweb.com>.
Quoting Ф Åô³Ì <pr...@hotmail.com>:

> If you use xindice 1.0, you'd try it with xindice 1.1!

I'm using 1.1b4 and it doesn't work.  Has anyone else been able to add documents
to a collection from Java?  If so, can you send me an example?

> >From: "R. Mark Volkmann" <ma...@ociweb.com>
> >Reply-To: xindice-users@xml.apache.org
> >To: xindice-users@xml.apache.org
> >Subject: XUpdate to add a document to a collection
> >Date: Tue,  4 Jan 2005 10:47:11 -0600
> >
> >I need to add a document to a collection from a Java application.  I'm
> trying to
> >do this using the XUpdate API.  Is this the best way?
> >
> >Here is the xupdate string I'm passing to my XUpdateQueryService update
> method.
> >
> ><xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
> >   <xu:insert-after select="/services/service[1]">
> >     <xu:element name="service">
> >       <xu:attribute name="name">foo</xu:attribute>
> >       <description>bar</description>
> >     </xu:element>
> >   </xu:insert-after>
> ></xu:modifications>
> >
> >It fails with the following stack trace.
> >
> >org.xmldb.api.base.XMLDBException: org.apache.xmlrpc.XmlRpcException:
> Error
> >Compiling XPath Expression: null
> >	at
>
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:119)
>
> >	at
>
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:515)
>
> >	at
>
>org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)
>
> >	at
>
>org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)
>
> >	at
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:81)
>
> >
> >Any suggestions would be greatly appreciated!
> >
> >--
> >R. Mark Volkmann
> >Partner, Object Computing, Inc.
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com
>
>


--
R. Mark Volkmann
Partner, Object Computing, Inc.

RE: XUpdate to add a document to a collection

Posted by 肖 鹏程 <pr...@hotmail.com>.
If you use xindice 1.0, you'd try it with xindice 1.1!

>From: "R. Mark Volkmann" <ma...@ociweb.com>
>Reply-To: xindice-users@xml.apache.org
>To: xindice-users@xml.apache.org
>Subject: XUpdate to add a document to a collection
>Date: Tue,  4 Jan 2005 10:47:11 -0600
>
>I need to add a document to a collection from a Java application.  I'm 
trying to
>do this using the XUpdate API.  Is this the best way?
>
>Here is the xupdate string I'm passing to my XUpdateQueryService update 
method.
>
><xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
>   <xu:insert-after select="/services/service[1]">
>     <xu:element name="service">
>       <xu:attribute name="name">foo</xu:attribute>
>       <description>bar</description>
>     </xu:element>
>   </xu:insert-after>
></xu:modifications>
>
>It fails with the following stack trace.
>
>org.xmldb.api.base.XMLDBException: org.apache.xmlrpc.XmlRpcException: 
Error
>Compiling XPath Expression: null
>	at
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:119)

>	at
>org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:515)

>	at
>org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)

>	at
>org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)

>	at
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:81)

>
>Any suggestions would be greatly appreciated!
>
>--
>R. Mark Volkmann
>Partner, Object Computing, Inc.

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  


XUpdate to add a document to a collection

Posted by "R. Mark Volkmann" <ma...@ociweb.com>.
I need to add a document to a collection from a Java application.  I'm trying to
do this using the XUpdate API.  Is this the best way?

Here is the xupdate string I'm passing to my XUpdateQueryService update method.

<xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
  <xu:insert-after select="/services/service[1]">
    <xu:element name="service">
      <xu:attribute name="name">foo</xu:attribute>
      <description>bar</description>
    </xu:element>
  </xu:insert-after>
</xu:modifications>

It fails with the following stack trace.

org.xmldb.api.base.XMLDBException: org.apache.xmlrpc.XmlRpcException: Error
Compiling XPath Expression: null
	at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:119)
	at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:515)
	at
org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)
	at
org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)
	at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:81)

Any suggestions would be greatly appreciated!

--
R. Mark Volkmann
Partner, Object Computing, Inc.

Re: XML:DB Initiative and Xindice activity

Posted by Keywan Najafi Tonekaboni <na...@is.informatik.uni-duisburg.de>.
Hi,

accidently a domain grabber registered this domain. try 

http://xmldb-org.sourceforge.net/

instead. I told in xindice-dev, that the url is out of order and the new
url, but they dont react.

i think the xmldb people are still active.

Regards,

Keywan

On Tue, Jan 04, 2005 at 08:39:48AM -0600, R. Mark Volkmann wrote:
> I'm just getting started with Xindice.
> 
> Should I be troubled by the fact that http://www.xmldb.org leads to a page that
> says "Coming Soon!"?  Is the XML:DB initiative active?
> 
> For that matter, is development of Xindice still active?  It appears that the
> last release was on April 9, 2004.
> 
> --
> R. Mark Volkmann
> Partner, Object Computing, Inc.