Hi,

I have tried to use XMLDB API in servlet in Xindice 1.0, but it only can run in 
java application rather than in servlet or jsp.
In addition, I have tried 
http://xml.apache.org/xindice/dev/guide-developer.html#N10232 in cvs of Xindice 
but got error.
It seems cannot be run as class in servlet or jsp. And I cannot found any 
examples on using it with servlet and jsp.
Moreover, I need 1.1 cvs because of it support utf8 with non english characters.

In recent post, I found that someone said only access Xindice wiht XML-RPC or 
command-line
www.markjstang.com/embeddedxindice.html.

That's why I use XML-RPC, indeed, I can you XML-RPC to access the Xindice with 
the same machine but cannot query.
It is what the case I met. 

Tell me if I get any wrong. Thanks


Trevor Leung



-----Original Message-----
From: Roth, Scott [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2003 10:41 PM
To: 'Trevor Leung'
Subject: RE: Query Error


I'm going to take this off of the Xindice list for now.  We can post it up
there later if we want to.

I still don't understand why you need the implementation classes.  You can
use the XMLDB API in a servlet, in classes, or in JSPs.  It doesn't matter.
Once you pass in the connection string (xmldb:xindice:///db/ if you are on
the same machine or xmldb:xindice://SOMEHOST:8080/db/ if you on a different
computer) you can connect to the Database via RPC.  It will take care of
everything for you behind the scenes.  Just get the collection you are
interested in, get an instance of the query service from it, and then run
you xpath query.

Am I missing one of your requirements?

Scott

-----Original Message-----
From: Trevor Leung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 09, 2003 10:11 AM
To: [email protected]
Subject: RE: Query Error


Hi Scott,

Yes, since I need to use it with servlet as an webapp with interface for
query.


Trevor Leung


-----Original Message-----
From: Roth, Scott [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2003 9:45 PM
To: '[email protected]'
Subject: RE: Query Error


Do you have a reason to use the Xindice implementation classes?  If not, it
is much simpler to use the XMLDB API interfaces.  Then you don't have to
worry about the implementation details; it is all abstracted for you.

Look at:
http://xml.apache.org/xindice/dev/guide-developer.html#N10232
For some sample code on how to get started.

Scott

-----Original Message-----
From: Trevor Leung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 09, 2003 5:11 AM
To: Xindice-Users
Subject: Query Error


Hi,

I use the attached java to connect the Xindice via XMLRPC, which can connect
but with query error.
Are there any wrong of it.

I use org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java to
implement the connections

For the query function with 

public ResourceSet query(String name, String queryLang, String query,
Hashtable nsMap)
{
.....
}

What parameter should I put into Hashtable? am I put the wrong parameter?


The result is listed below:
===============================================
java xmldbtest
org.xmldb.api.base.XMLDBException: Query error
null rs

test1

test2

test3

test4

test5

test6

test7

test8
=======================================================

Thanks for your help,

Regards,
--------------------
Trevor Leung
CINTEC, CUHK


----------------------------------------------------------------------------
--
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that
may be confidential, proprietary copyrighted and/or legally privileged, and
is intended solely for the use of the individual or entity named in this
message.  If you are not the intended recipient, and have received this
message in error, please immediately return this by e-mail and then delete
it.

============================================================================
==



------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may 
be confidential, proprietary copyrighted and/or legally privileged, and is 
intended solely for the use of the individual or entity named in this message.  
If you are not the intended recipient, and have received this message in error, 
please immediately return this by e-mail and then delete it.

==============================================================================

Reply via email to