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 "Mark R. Diggory" <md...@latte.harvard.edu> on 2003/04/30 21:57:18 UTC
Concerning XindiceServlet and XMLDB Clients
I've been tweeking the XindiceServlet code a bit to get familiar with it
. I'm curious why theres a decision to force the the path between its
XML-RPC interface and the XMLDB client to be "/Xindice" ?
Currently its required that the servlet be at
http://host:port/Xindice/db...
And the XMLDB clients path be
xmldb:xindice://host:port/db/.....
I think this is the only way that remote access can occur over the
XML-RPC client driver (Am I correct?).
Wouldn't it be more powerful to freeup the location that XindiceServet
is accessable from by including such path info into the clients URI?
xmldb:xindice://host:port/Xindice/db/.....
then you can place the Servlet in any web application location and still
be able to access it simply by the remote RPC based client
xmldb:xindice://host:port/Foo/Bar/db/.....
xmldb:xindice://host:port/Foo/Bar/db2/....
xmldb:xindice://host:port/Foo/Bar/db3/....
xmldb:xindice://host:port/HelloWorld/db/....
xmldb:xindice://host:port/db/....
xmldb:xindice://host:port/....
Webapplication developers can then choose where the XML-RPC access to
thier db may or may not occur and Multiple RPC points can exist in one
server namespace.
Thoughts?
-Mark
Re: Concerning XindiceServlet and XMLDB Clients
Posted by "Michael Westbay (Dev)" <we...@users.sourceforge.net>.
Mark R. Diggory wrote:
> The CVS HEAD. Which classes did it change, I looked through
> DatabaseImpl and CollectionImpl histories for the embed and xmlrpc
> drivers, but didn't recognize a change like your suggesting, but my
> naivety with the code could easily be the case here as well.
It was XindiceServlet.java, as the Subject suggests.
If you have archives on your local machine, I first sent in the patch
on November 27, 2002 in a message with the subject "re: about writing
howtos."
My patched got lost in the discussion of other things, so I sent it in
again on November 30 under the subject of "Re: Database root directory fix."
Then somebody patched an unrelated portion of XindiceServlet.java, so I
created a new patch against the 1.9 revision (the first patch was
against revision 1.7). This patch was sent on December 13, 2002 under
the subject of "XindiceServlet Context Root." Rabellino-san followed
that up stating that he committed it.
I just ran:
$ cvs diff java/src/org/apache/xindice/server/XindiceServlet.java
and see that my patches were, in fact, committed.
So, back to the original problem, I understood that you were poking
around XindiceServlet and noticed the hard coded /Xindice context path.
Can you run:
$ cvs status java/src/org/apache/xindice/server/XindiceServlet.java
on it. This is what I get:
===================================================================
File: XindiceServlet.java Status: Up-to-date
Working revision: 1.10
Repository revision: 1.10 /home/cvspublic/xml-xindice/java/src/org/apache/
xindice/server/XindiceServlet.java,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
===================================================================
Is your revision 1.10?
Hope this helps.
--
Michael Westbay
Re: Concerning XindiceServlet and XMLDB Clients
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Michael,
Thanks for your effort in checking out your code again. Yes, its true,
I'm more interested in this from the clients standpoint. Its interesting
to see this issue thought about in terms of the Service. It seems the
real limitation now is only in the xml-rpc client driver.
I think the real struggle would be where the URL ends and the Service
begins, generically we are talking about:
xmldb:xindice://host:port/url/database/collection
In the current implementation case, if the client could provided for the
full uri location of the xml-rpc service it would look like this:
xmldb:xindice://somewhere.org:80/Xindice/db/AddressBook
In this case my question would be, where the xml-rpc service started at
in the path, it could be: /Xindice, /db, or /AddressBook.
From the xmlrpc Collection constructor, it would appear that this would
be very important and difficult to account for as the xmlrpc service is
hardcoded to this point:
String xmlrpcURI = "http://" + hostPort + XINDICE_SERVICE_LOCATION;
...
client = new XmlRpcClient(xmlrpcURI);
/* Just check the collection does actually exist */
Hashtable params = new Hashtable();
params.put(RPCDefaultMessage.COLLECTION, collPath);
String exists = (String) runRemoteCommand("GetCollectionConfiguration",
params);
...
Maybe this is a task more appropriately handled in the "configuration"
capabilities that are promoted for the next version of xmldb?
something like: path-to-service=/Xindice and free up
XINDICE_SERVICE_LOCATION as a property that is adjustable?
After working with JNDI for awhile, I have to say that leaving such
properties to an "Environmental" configuration really does leave the
implementors with alot more freedom when providing configuration
capabilities.
-Mark
Michael Westbay (Dev) wrote:
> Sorry, ignore that last message. I thought you were wondering why the
> servlet was hard coded to /Xindice - that's what I had fixed so that it
> would work under any context one chose. I didn't explore the client
> code - which I thought did work as you described in your first message.
> It's been several months since I tested this, and I no longer have the
> test environment that I had before.
>
> I'll setup Xindice again and dig my tests out of an archive.
>
> The servlet no longer has the restriction you're referring to. That's
> all I can say for sure right now. Hope I didn't cause too much confusion.
>
Re: Concerning XindiceServlet and XMLDB Clients
Posted by "Michael Westbay (Dev)" <we...@users.sourceforge.net>.
Sorry, ignore that last message. I thought you were wondering why the
servlet was hard coded to /Xindice - that's what I had fixed so that it
would work under any context one chose. I didn't explore the client
code - which I thought did work as you described in your first message.
It's been several months since I tested this, and I no longer have the
test environment that I had before.
I'll setup Xindice again and dig my tests out of an archive.
The servlet no longer has the restriction you're referring to. That's
all I can say for sure right now. Hope I didn't cause too much confusion.
--
Michael Westbay
Re: Concerning XindiceServlet and XMLDB Clients
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
The CVS HEAD. Which classes did it change, I looked through DatabaseImpl
and CollectionImpl histories for the embed and xmlrpc drivers, but
didn't recognize a change like your suggesting, but my naivety with the
code could easily be the case here as well.
-Mark
Michael Westbay (Dev) wrote:
> Mark R. Diggory wrote:
>
>> I've been tweeking the XindiceServlet code a bit to get familiar with
>> it . I'm curious why theres a decision to force the the path between
>> its XML-RPC interface and the XMLDB client to be "/Xindice" ?
>>
>> Currently its required that the servlet be at
>>
>> http://host:port/Xindice/db...
>
>
>
> I submitted a patch for this a number of months ago. I thought it was
> committed. Are you using the CVS version?
>
Re: Concerning XindiceServlet and XMLDB Clients
Posted by "Michael Westbay (Dev)" <we...@users.sourceforge.net>.
Mark R. Diggory wrote:
> I've been tweeking the XindiceServlet code a bit to get familiar with
> it . I'm curious why theres a decision to force the the path between
> its XML-RPC interface and the XMLDB client to be "/Xindice" ?
>
> Currently its required that the servlet be at
>
> http://host:port/Xindice/db...
I submitted a patch for this a number of months ago. I thought it was
committed. Are you using the CVS version?
--
Michael Westbay