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 Mark Diggory <md...@latte.harvard.edu> on 2002/04/03 02:18:03 UTC

XML:DB api

I'm struggling with getting the XML:DB API functioning on the local 
machine without the HTTP Service running.

I guess for my first question I should ask: I this possible?

I have the Services starting up (with the HTTP Service commented out in 
System.xml). My IOR is created in the docs directory.

How do I get to the XML:DB (corba?) interface? I see the corba service 
started on its port on my machine.

I get the when I try to add a Collection using XML:DB API:

ERROR : A connection to the database instance 'db' could not be created.

-Mark Diggory


question on xindice & Document Management

Posted by Kanarinka <ka...@ikatun.com>.
Hi Xindice Experts --

Here's our problem: we would like to be able to have our xml docs
reference/link to/include other xml docs in order to 1) keep documents
small in size and 2) preserve readability. Is there any way to do this
in Xindice?

What i mean is that we would like to have, say, a "BookShelf" object
defined by an XMLSchema document. The bookshelf xsd defines that the
bookshelf can have 0..* book objects. In our implementation xml docs
that we store in xindice, we would like the bookshelf to be an xml
document and each book to be its own xml document. What I am confused
about is how the bookshelf xml doc would reference/link to each
individual book document.

Is something like this possible in xindice (or in xml for that matter)?

I have been investigating technologies like XLink and XInclude and i am
unclear both on the problems they are designed to solve and whether or
not they are supported by other technologies (such as xerces and
xindice).

If anyone could shed some light on this matter I would most appreciate
it!!

Thanks!
Catie D'Ignazio


Re: Don't understand some Vendor Error Codes...

Posted by Mark Diggory <md...@latte.harvard.edu>.
I changed my dbroot back to "db" to see if it's really the case that my 
dbroot is configured wrong, and now it works ok. Why should my dbroot 
have to be "db"?

It really seems unclear how to define multiple databases in one Server. 
I havn't seen a clear answer of how to do this from the list yet. I hope 
someone comes along who can make this clearer in the next day or so.

-Mark



Mark Diggory wrote:

> Yes, user is my db instance according to my System.xml.
> 
> <service class="org.apache.xindice.server.services.XindiceService" 
> name="Xindice">
> <root-collection dbroot="./user/" name="user" security="false">
> ...
> </root-collection>
> </service>
> 
> 
> Kurt Ward wrote:
> 
>> I think you need to include the database instance in
>> your URI like: xmldb:xindice:///db/user
>>
>> Kurt
>>
>> --- Mark Diggory <md...@latte.harvard.edu> wrote:
>>
>>> I'm trying to create a new Collection using the
>>> XML:DB api. I keep getting a Vendor Error Code 2070 when I try to
>>> establish:
>>>
>>> col =
>>>
>>>
>> DatabaseManager.getCollection("xmldb:xindice:///user/");
>>
>>> my user db exists and is instantiated, but I can't
>>> seem to get to the root collection (after which I will create a new
>>> collection in the db).
>>>
>>> -Mark
>>>
>>>
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Yahoo! Tax Center - online filing with TurboTax
>> http://taxes.yahoo.com/
>>
> 
> 



Re: Don't understand some Vendor Error Codes...

Posted by Mark Diggory <md...@latte.harvard.edu>.
Yes, user is my db instance according to my System.xml.

<service class="org.apache.xindice.server.services.XindiceService" 
name="Xindice">
<root-collection dbroot="./user/" name="user" security="false">
...
</root-collection>
</service>


Kurt Ward wrote:

> I think you need to include the database instance in
> your URI like: xmldb:xindice:///db/user
> 
> Kurt
> 
> --- Mark Diggory <md...@latte.harvard.edu> wrote:
> 
>>I'm trying to create a new Collection using the
>>XML:DB api. I keep 
>>getting a Vendor Error Code 2070 when I try to
>>establish:
>>
>>col =
>>
>>
> DatabaseManager.getCollection("xmldb:xindice:///user/");
> 
>>my user db exists and is instantiated, but I can't
>>seem to get to the 
>>root collection (after which I will create a new
>>collection in the db).
>>
>>-Mark
>>
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 



Re: Don't understand some Vendor Error Codes...

Posted by Kurt Ward <ku...@yahoo.com>.
I think you need to include the database instance in
your URI like: xmldb:xindice:///db/user

Kurt

--- Mark Diggory <md...@latte.harvard.edu> wrote:
> I'm trying to create a new Collection using the
> XML:DB api. I keep 
> getting a Vendor Error Code 2070 when I try to
> establish:
> 
> col =
>
DatabaseManager.getCollection("xmldb:xindice:///user/");
> 
> my user db exists and is instantiated, but I can't
> seem to get to the 
> root collection (after which I will create a new
> collection in the db).
> 
> -Mark
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Don't understand some Vendor Error Codes...

Posted by Mark Diggory <md...@latte.harvard.edu>.
I'm trying to create a new Collection using the XML:DB api. I keep 
getting a Vendor Error Code 2070 when I try to establish:

col = DatabaseManager.getCollection("xmldb:xindice:///user/");

my user db exists and is instantiated, but I can't seem to get to the 
root collection (after which I will create a new collection in the db).

-Mark


Re: XML:DB api

Posted by Kimbro Staken <ks...@xmldatabases.org>.
On Tuesday, April 2, 2002, at 06:14 PM, Mark Diggory wrote:

>
>> It will use the same HTTP server and port. In this case you're actually 
>> kind of stuck too, since all communications with the server will be 
>> through HTTP. The only way around it would be to directly embed Xindice 
>> inside a Tomcat instance, which is very possible.
>>
>
>
> Yes, I am, I even have a Servlet with init/destroy methods that starts 
> and stops the the Xindice Services. I'm sure I could use the Xindice 
> interface to access the db, but I was hoping to be able to stick with XML:
> DB because your examples are easy to use and understand.

Since you're embedding it, It will be trivial to convert the XML-RPC 
interface to run from directly within Tomcat. Then you can still use the 
XML:DB API without the internal Xindice HTTP server.

What I really want is a local only version of the XML:DB API designed for 
embedded situations, then you wouldn't need any kind of network service 
unless you need to use the command line tools. It would be really easy to 
build, I've just been too lazy to do it.

>
> -Mark
>
>
>
>
>
Kimbro Staken
Java and XML Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org


Re: XML:DB api

Posted by Mark Diggory <md...@latte.harvard.edu>.
> 
> It will use the same HTTP server and port. In this case you're actually 
> kind of stuck too, since all communications with the server will be 
> through HTTP. The only way around it would be to directly embed Xindice 
> inside a Tomcat instance, which is very possible.
>


Yes, I am, I even have a Servlet with init/destroy methods that starts 
and stops the the Xindice Services. I'm sure I could use the Xindice 
interface to access the db, but I was hoping to be able to stick with 
XML:DB because your examples are easy to use and understand.

-Mark





Re: XML:DB api

Posted by Kimbro Staken <ks...@xmldatabases.org>.
On Tuesday, April 2, 2002, at 05:48 PM, Mark Diggory wrote:

> Mike,
>
>
>> No, it isn't. The current XML:DB API impl uses CORBA to talk to the 
>> server, but it needs to be able to contact it via HTTP initially, to 
>> bootstrap the CORBA connection.
>
>
> Ok, hmmm. Well, I'm dealing with a situation where I already have http 
> services running via apache and tomcat, I'd love to just drop my ior into 
> my doc base there and use the already installed services, however,
>
> I anticipate this is also not workable as the Xindice XML:DB 
> implmentation is probibly looking specifically on port 4080 for the ior 
> isn't it? As well the APIService in Xindice hard codes the location of 
> the ior relative to XINDICE_HOME (Ouch).

If you're on UNIX a symbolic link would fix you right up. I was also going 
to say just make it configurable and send us a patch, but then I 
remembered that APIService is going to be removed from 1.1 onwards.

As for the client API, you can specify the port as part of the URI.

>
>
>> IIRC, the upcoming XMLRPC impl of the XML:DB API will unfortunately be 
>> using http anyway, so there's no real way out of it.
>
>
> Hmm, is the XMLRPC service going to be running directly through the HTTP 
> Server? Will it run on a specific port? Just curious.
>

It will use the same HTTP server and port. In this case you're actually 
kind of stuck too, since all communications with the server will be 
through HTTP. The only way around it would be to directly embed Xindice 
inside a Tomcat instance, which is very possible.

>
> -Mark
>
>
Kimbro Staken
Java and XML Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org


Re: XML:DB api

Posted by Mark Diggory <md...@latte.harvard.edu>.
Mike,


> No, it isn't. The current XML:DB API impl uses CORBA to talk to the 
> server, but it needs to be able to contact it via HTTP initially, to 
> bootstrap the CORBA connection.
> 


Ok, hmmm. Well, I'm dealing with a situation where I already have http 
services running via apache and tomcat, I'd love to just drop my ior 
into my doc base there and use the already installed services, however,

I anticipate this is also not workable as the Xindice XML:DB 
implmentation is probibly looking specifically on port 4080 for the ior 
isn't it? As well the APIService in Xindice hard codes the location of 
the ior relative to XINDICE_HOME (Ouch).


> IIRC, the upcoming XMLRPC impl of the XML:DB API will unfortunately be 
> using http anyway, so there's no real way out of it.
> 


Hmm, is the XMLRPC service going to be running directly through the HTTP 
Server? Will it run on a specific port? Just curious.


-Mark


Re: XML:DB api

Posted by Michael Gratton <mi...@vee.net>.
Hey Mark,

Mark Diggory wrote:
> I'm struggling with getting the XML:DB API functioning on the local 
> machine without the HTTP Service running.
> 
> I guess for my first question I should ask: I this possible?
> 

No, it isn't. The current XML:DB API impl uses CORBA to talk to the 
server, but it needs to be able to contact it via HTTP initially, to 
bootstrap the CORBA connection.

IIRC, the upcoming XMLRPC impl of the XML:DB API will unfortunately be 
using http anyway, so there's no real way out of it.

Mike.

-- 
Mike Gratton <mi...@vee.net>, <http://web.vee.net/>
Leader in leachate production and transmission since 1976.