svn commit: r595817 - in /xml/xindice/trunk: ./ config/ java/src/org/apache/xindice/client/xmldb/xmlrpc/ java/src/org/apache/xindice/core/query/ java/src/org/apache/xindice/server/ java/src/org/apache/xindice/server/rpc/ java/src/org/apache/xindice/ser...

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Fri Nov 16 12:49:03 2007
New Revision: 595817

URL: http://svn.apache.org/viewvc?rev=595817&view=rev
Log:
      <action dev="VG" type="update">
        Update XML-RPC library to the version 3.1.
      </action>


Added:
    xml/xindice/trunk/lib/ws-commons-util-1.0.2.jar   (with props)
    xml/xindice/trunk/lib/xmlrpc-client-3.1.jar   (with props)
    xml/xindice/trunk/lib/xmlrpc-common-3.1.jar   (with props)
    xml/xindice/trunk/lib/xmlrpc-server-3.1.jar   (with props)
Removed:
    xml/xindice/trunk/lib/xmlrpc-1.1.jar
Modified:
    xml/xindice/trunk/config/system.xml
    xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java
    xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java
    xml/xindice/trunk/java/src/org/apache/xindice/core/query/QueryUtil.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/XindiceServlet.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessage.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessageInterface.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateCollection.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateIndexer.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateNewOID.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetApiVersion.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionCount.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionMeta.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocument.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentCount.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentMeta.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetIndexerConfiguration.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetResource.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetServerVersion.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertDocument.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertResource.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListCollections.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListDocuments.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListIndexers.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Query.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveDocument.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveIndexer.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetCollectionMeta.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocument.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocumentMeta.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Shutdown.java
    xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/UpdateIndexer.java
    xml/xindice/trunk/java/src/org/apache/xindice/util/SymbolDeserializer.java
    xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java
    xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml
    xml/xindice/trunk/status.xml

Modified: xml/xindice/trunk/config/system.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/config/system.xml?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/config/system.xml (original)
+++ xml/xindice/trunk/config/system.xml Fri Nov 16 12:49:03 2007
@@ -77,18 +77,7 @@
       -->
 
     <!--
-      - XML-RPC configuration for the Xindice server. Specifies name of the parser
-      - to be used by XML-RPC. Apache XML-RPC knows following parsers:
-      -    xerces   org.apache.xerces.parsers.SAXParser
-      -    xp       com.jclark.xml.sax.Driver
-      -    ibm1     com.ibm.xml.parser.SAXDriver
-      -    ibm2     com.ibm.xml.parsers.SAXParser
-      -    aelfred  com.microstar.xml.SAXDriver
-      -    oracle1  oracle.xml.parser.XMLParser
-      -    oracle2  oracle.xml.parser.v2.SAXParser
-      -    openxml  org.openxml.parser.XMLSAXParser
+      - Enable XML-RPC interface for the Xindice server.
       -->
-    <xml-rpc>
-        <driver name="xerces"/>
-    </xml-rpc>
+    <xml-rpc/>
 </xindice>

Modified: xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java Fri Nov 16 12:49:03 2007
@@ -23,8 +23,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.xindice.client.xmldb.ResourceSetImpl;
 import org.apache.xindice.client.xmldb.XindiceCollection;
-import org.apache.xindice.client.xmldb.resources.XMLResourceImpl;
 import org.apache.xindice.client.xmldb.resources.BinaryResourceImpl;
+import org.apache.xindice.client.xmldb.resources.XMLResourceImpl;
 import org.apache.xindice.core.FaultCodes;
 import org.apache.xindice.core.meta.MetaData;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
@@ -33,8 +33,9 @@
 import org.apache.xindice.xml.TextWriter;
 import org.apache.xindice.xml.dom.DOMParser;
 import org.apache.xindice.xml.dom.DocumentImpl;
-import org.apache.xmlrpc.XmlRpcClient;
 import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
 
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
@@ -46,10 +47,12 @@
 import org.xmldb.api.modules.XMLResource;
 
 import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.IOException;
+
 import java.io.StringReader;
+import java.net.URL;
+import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Vector;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
@@ -67,7 +70,7 @@
     /**
      * The XML-RPC client stub, connected to the server
      */
-    private XmlRpcClient client = null;
+    private XmlRpcClient client;
 
     /**
      * Creates new <code>CollectionImpl</code> instance representing connection
@@ -84,7 +87,7 @@
         this.client = client;
 
         /* Just check the collection does actually exist */
-        Hashtable params = new Hashtable();
+        Map params = new HashMap(3);
         params.put(RPCDefaultMessage.COLLECTION, collPath);
         String exists = (String) runRemoteCommand("GetCollectionConfiguration", params);
 
@@ -96,6 +99,15 @@
     }
 
     /**
+     * Returns URL used by the XML-RPC client.
+     *
+     * @return URL used by the XML-RPC client.
+     */
+    private URL getURL() {
+        return ((XmlRpcClientConfigImpl) client.getClientConfig()).getServerURL();
+    }
+
+    /**
      * Submits a command for RPC to database server
      *
      * @param cmdName command name
@@ -105,12 +117,10 @@
      *
      * @exception XMLDBException thrown if XML-RPC reports an exception.
      */
-    private Object runRemoteCommand(String cmdName, Hashtable params) throws XMLDBException {
+    private Object runRemoteCommand(String cmdName, Map params) throws XMLDBException {
         try {
             params.put(RPCMessageInterface.MESSAGE_PARAM, cmdName);
-            Vector v = new Vector();
-            v.add(params);
-            return ((Hashtable) client.execute("run", v)).get(RPCDefaultMessage.RESULT);
+            return ((Map) client.execute("run", new Object[]{ params })).get(RPCDefaultMessage.RESULT);
         } catch (XmlRpcException e) {
             if (log.isDebugEnabled()) {
                 log.debug("Got XmlRpc exception running command " + cmdName + ", code: " + e.code + ", msg: " + e.getMessage());
@@ -123,10 +133,7 @@
             }
 
             throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, FaultCodes.GEN_GENERAL_ERROR,
-                                     "Failed to execute command '" + cmdName + "' on server: " + client.getURL() + ", message: " + e.getMessage(), e);
-        } catch (IOException e) {
-            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, FaultCodes.GEN_GENERAL_ERROR,
-                                     "Cannot communicate with the server: " + client.getURL(), e);
+                                     "Failed to execute command '" + cmdName + "' on server: " + getURL() + ", message: " + e.getMessage(), e);
         }
     }
 
@@ -151,7 +158,7 @@
                 return null;
             }
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, id);
             params.put(RPCDefaultMessage.COMPRESSED, "true");
@@ -161,14 +168,17 @@
             if (result == null) {
                 // No resource found
                 return null;
-            } else if (result instanceof Hashtable) {
+
+            } else if (result instanceof Map) {
                 // Result is compressed XML.
-                Hashtable compressed = (Hashtable) result;
+                Map compressed = (Map) result;
                 SymbolDeserializer symbolDeserial = new SymbolDeserializer();
                 return new XMLResourceImpl(id, id, this, symbolDeserial.getSymbols(compressed), (byte[]) compressed.get("document"));
+
             } else if (result instanceof byte[]) {
                 // Result is binary.
                 return new BinaryResourceImpl(id, this, (byte[]) result);
+
             } else {
                 // Result is XML.
                 return new XMLResourceImpl(id, this, (String) result);
@@ -199,7 +209,7 @@
         checkOpen();
         try {
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             return ((Integer) runRemoteCommand("GetDocumentCount", params)).intValue();
         } catch (XMLDBException x) {
@@ -233,7 +243,7 @@
 
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, res.getId());
             params.put(RPCDefaultMessage.DOCUMENT, res.getContent());
@@ -264,7 +274,7 @@
     public String getURI() {
 
         return "xmldb:" + DatabaseImpl.DRIVER_NAME + "://" +
-                client.getURL().getHost() + ':' + client.getURL().getPort() +
+                getURL().getHost() + ':' + getURL().getPort() +
                 collPath;
     }
 
@@ -314,7 +324,7 @@
         checkOpen();
         try {
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             return (String) runRemoteCommand("CreateNewOID", params);
         } catch (XMLDBException x) {
@@ -395,7 +405,7 @@
         checkOpen();
         try {
             // TODO: Test BinaryResource workings
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, res.getId());
             runRemoteCommand("RemoveDocument", params);
@@ -425,11 +435,15 @@
         checkOpen();
         try {
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
-            Vector list = (Vector) runRemoteCommand("ListCollections", params);
+            // XML-RPC returns array of String objects
+            Object[] result = (Object[]) runRemoteCommand("ListCollections", params);
+            String[] list = new String[result.length];
+            //noinspection SuspiciousSystemArraycopy
+            System.arraycopy(result, 0, list, 0, result.length);
 
-            return (String[]) list.toArray(new String[list.size()]);
+            return list;
         } catch (XMLDBException x) {
 
             throw x;  // propagate any xmldb exception.
@@ -455,7 +469,7 @@
         checkOpen();
         try {
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             Integer result = (Integer) runRemoteCommand("GetCollectionCount", params);
             return result.intValue();
@@ -484,11 +498,15 @@
         checkOpen();
         try {
 
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
-            Vector list = (Vector) runRemoteCommand("ListDocuments", params);
+            // XML-RPC returns array of String objects
+            Object[] result = (Object[]) runRemoteCommand("ListDocuments", params);
+            String[] list = new String[result.length];
+            //noinspection SuspiciousSystemArraycopy
+            System.arraycopy(result, 0, list, 0, result.length);
 
-            return (String[]) list.toArray(new String[list.size()]);
+            return list;
         } catch (XMLDBException x) {
 
             throw x;  // propagate any xmldb exception.
@@ -503,7 +521,7 @@
 
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.TYPE, queryLang);
             params.put(RPCDefaultMessage.NAMESPACES, nsMap);
@@ -533,7 +551,7 @@
     public Collection createCollection(String path, Document configuration) throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap(5);
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, path);
             if (configuration != null) {
@@ -580,7 +598,7 @@
 
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, childName);
 
@@ -601,11 +619,15 @@
     public String[] listIndexers() throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
-            Vector list = (Vector) runRemoteCommand("ListIndexers", params);
+            // XML-RPC returns array of String objects
+            Object[] result = (Object[]) runRemoteCommand("ListIndexers", params);
+            String[] list = new String[result.length];
+            //noinspection SuspiciousSystemArraycopy
+            System.arraycopy(result, 0, list, 0, result.length);
 
-            return (String[]) list.toArray(new String[list.size()]);
+            return list;
         } catch (Exception e) {
             throw FaultCodes.createXMLDBException(e);
         }
@@ -615,7 +637,7 @@
     public void createIndexer(Document configuration) throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.CONFIGURATION, TextWriter.toString(configuration));
 
@@ -629,7 +651,7 @@
     public void dropIndexer(String name) throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             params.put(RPCDefaultMessage.NAME, name);
 
@@ -643,7 +665,7 @@
     public void shutdown() throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
 
             runRemoteCommand("Shutdown", params);
         } catch (Exception e) {
@@ -654,7 +676,7 @@
     public MetaData getMetaData(String id) throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             if (id != null) {
                 params.put(RPCDefaultMessage.NAME, id);
@@ -674,7 +696,7 @@
     public void setMetaData(String id, MetaData meta) throws XMLDBException {
         checkOpen();
         try {
-            Hashtable params = new Hashtable();
+            Map params = new HashMap();
             params.put(RPCDefaultMessage.COLLECTION, collPath);
             if (id != null) {
                 params.put(RPCDefaultMessage.NAME, id);

Modified: xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java Fri Nov 16 12:49:03 2007
@@ -22,8 +22,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.xindice.client.xmldb.CommonConfigurable;
-import org.apache.xmlrpc.XmlRpc;
-import org.apache.xmlrpc.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
 
 import org.xmldb.api.base.Collection;
 import org.xmldb.api.base.Database;
@@ -31,6 +31,7 @@
 import org.xmldb.api.base.XMLDBException;
 
 import java.net.MalformedURLException;
+import java.net.URL;
 
 /**
  * Implements XML:DB's <code>Database</code> interface using XML-RPC to communicate
@@ -70,17 +71,6 @@
     public static final String SYSPROP_SERVICE_LOCATION = "xindice.xmlrpc.service-location";
 
     /**
-     * Driver property name for the SAX parser xml-rpc will use.
-     */
-    public static final String PROP_XMLRPC_DRIVER = "xmlrpc-driver";
-
-    /**
-     * System property name for the SAX parser xml-rpc will use in case
-     * there were no configuration property passed
-     */
-    public static final String SYSPROP_XMLRPC_DRIVER = "xindice.xmlrpc.driver";
-
-    /**
      * Driver property name for the basic authentication user name.
      */
     public static final String PROP_XMLRPC_USER = "xmlrpc-user";
@@ -103,11 +93,6 @@
     public static final String SYSPROP_XMLRPC_PASSWORD = "xindice.xmlrpc.password";
 
     /**
-     * Default value of the xmlrpc-driver property
-     */
-    private static final String DEFAULT_XMLRPC_DRIVER = "xerces";
-
-    /**
      * Default path to the XML-RPC service in the web server
      */
     private static final String DEFAULT_SERVICE_LOCATION = "/xindice/";
@@ -122,18 +107,11 @@
      */
     private static final String CONFORMANCE_LEVEL = "0";
 
-    /**
-     * Ensures that XML-RPC static properties initialized just once
-     */
-    private static boolean xmlRpcInitialized;
 
     /**
-     * Location of the XML-RPC service in the web server
+     * XML-RPC client used to communicate with the server
      */
-    private String serviceLocation;
-
-    private String basicUser;
-    private String basicPassword;
+    private XmlRpcClient client;
 
 
     /**
@@ -172,52 +150,8 @@
     }
 
     /**
-     * Initialize XML-RPC library static properties: encoding, keep-alive, SAX driver.
-     *
-     * @throws XMLDBException if specified (or default, if none specified) SAX driver
-     *         class could not be loaded
-     */
-    private void initialize() throws XMLDBException {
-        synchronized (getClass()) {
-            if (!xmlRpcInitialized) {
-                XmlRpc.setEncoding("UTF8");
-                XmlRpc.setKeepAlive(true);
-
-                /*
-                 * Determine the SAXparser the xmlrpc client will use.
-                 *
-                 * In priority order:
-                 *   DatabaseImpl xmlrpc-driver property
-                 *      (passed in the xmlrpc-driver parameter)
-                 *   System property "xindice.xmlrpc.driver"
-                 *   Default value "xerces"
-                 */
-                String xmlrpcDriver = getProperty(PROP_XMLRPC_DRIVER);
-                if (xmlrpcDriver == null) {
-                    xmlrpcDriver = System.getProperty(SYSPROP_XMLRPC_DRIVER);
-                    if (xmlrpcDriver == null) {
-                        xmlrpcDriver = DEFAULT_XMLRPC_DRIVER;
-                    }
-                }
-
-                try {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Using SAX Driver: '" + xmlrpcDriver + "'");
-                    }
-                    XmlRpc.setDriver(xmlrpcDriver);
-                } catch (Exception e) {
-                    throw new XMLDBException(ErrorCodes.VENDOR_ERROR,
-                                             "SAX Driver " + xmlrpcDriver + " is not available", e);
-                }
-            }
-
-            xmlRpcInitialized = true;
-        }
-    }
-
-    /**
-     * Initialize XML-RPC service location, basic authentication.
-     * Create XML-RPC client.
+     * Initializes XML-RPC service location, basic authentication.
+     * Creates XML-RPC client.
      *
      * @param hostPort of the Xindice XML-RPC server
      * @return XML-RPC client connected to the Xindice server
@@ -225,11 +159,12 @@
      */
     private XmlRpcClient connect(String hostPort) throws XMLDBException {
 
-        // Initialize XML-RPC static properties
-        initialize();
-
         synchronized (this) {
-            if (serviceLocation == null) {
+            if (client == null) {
+                // Initialize XML-RPC static properties
+                XmlRpcClientConfigImpl cfg = new XmlRpcClientConfigImpl();
+                cfg.setEncoding("utf-8");
+                // FIXME Is XmlRpc.setKeepAlive(true); gone forever?
 
                 /*
                  * Determine the path in the web server to the XML-RPC service.
@@ -240,14 +175,13 @@
                  *   System property "xindice.xmlrpc.service-location"
                  *   Default value "/xindice/"
                  */
-                serviceLocation = getProperty(PROP_SERVICE_LOCATION);
+                String serviceLocation = getProperty(PROP_SERVICE_LOCATION);
                 if (serviceLocation == null) {
                     serviceLocation = System.getProperty(SYSPROP_SERVICE_LOCATION);
                     if (serviceLocation == null) {
                         serviceLocation = DEFAULT_SERVICE_LOCATION;
                     }
                 }
-
                 if (!serviceLocation.startsWith("/")) {
                     serviceLocation = "/" + serviceLocation;
                 }
@@ -255,44 +189,42 @@
                     serviceLocation = serviceLocation + "/";
                 }
 
+                String xmlRpcURL = "http://" + hostPort + serviceLocation;
                 if (log.isDebugEnabled()) {
-                    log.debug("Using Service Location: '" + serviceLocation + "'");
+                    log.debug("Using URL: '" + xmlRpcURL + "'");
+                }
+                try {
+                    cfg.setServerURL(new URL(xmlRpcURL));
+                } catch (MalformedURLException e) {
+                    throw new XMLDBException(ErrorCodes.INVALID_URI, e);
                 }
 
                 /*
                  * Determine basic authentication parameters
                  */
-                basicUser = getProperty(PROP_XMLRPC_USER);
+                String basicUser = getProperty(PROP_XMLRPC_USER);
                 if (basicUser == null) {
                     basicUser = System.getProperty(SYSPROP_XMLRPC_USER);
                 }
-
                 if (basicUser != null) {
-                    basicPassword = getProperty(PROP_XMLRPC_PASSWORD);
+                    String basicPassword = getProperty(PROP_XMLRPC_PASSWORD);
                     if (basicPassword == null) {
                         basicPassword = System.getProperty(SYSPROP_XMLRPC_PASSWORD);
                     }
+
                     if (log.isDebugEnabled()) {
                         log.debug("Using Basic authentication. User: '" + basicUser + "', password: '" + basicPassword + "'");
                     }
+                    cfg.setBasicUserName(basicPassword);
+                    cfg.setBasicPassword(basicPassword);
                 }
-            }
-        }
-
 
-        String xmlRpcURL = "http://" + hostPort + serviceLocation;
-        try {
-            if (log.isDebugEnabled()) {
-                log.debug("Using URI: '" + xmlRpcURL + "'");
+                client = new XmlRpcClient();
+                client.setConfig(cfg);
             }
-            XmlRpcClient client = new XmlRpcClient(xmlRpcURL);
-            if (basicUser != null) {
-                client.setBasicAuthentication(basicUser, basicPassword);
-            }
-            return client;
-        } catch (MalformedURLException e) {
-            throw new XMLDBException(ErrorCodes.INVALID_URI, e);
         }
+
+        return client;
     }
 
     /**

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/query/QueryUtil.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/query/QueryUtil.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/query/QueryUtil.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/query/QueryUtil.java Fri Nov 16 12:49:03 2007
@@ -19,6 +19,8 @@
 
 package org.apache.xindice.core.query;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.xindice.client.xmldb.XindiceCollection;
 import org.apache.xindice.core.data.NodeSet;
 import org.apache.xindice.util.XindiceRuntimeException;
@@ -27,18 +29,16 @@
 import org.apache.xindice.xml.dom.DBNode;
 import org.apache.xindice.xml.dom.DocumentImpl;
 import org.apache.xindice.xml.dom.NodeImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import org.w3c.dom.Attr;
+import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-import org.w3c.dom.Comment;
 import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
 
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  * Helper to convert NodeSet query result into the Document
@@ -53,7 +53,7 @@
      * Maps a Hashtable containing namespace definitions into a Xindice
      * NamespaceMap.
      */
-    public static NamespaceMap mapNamespaces(Hashtable namespaces) {
+    public static NamespaceMap mapNamespaces(Map namespaces) {
         if (namespaces != null && namespaces.size() > 0) {
             return new NamespaceMap(namespaces);
         }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/XindiceServlet.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/XindiceServlet.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/XindiceServlet.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/XindiceServlet.java Fri Nov 16 12:49:03 2007
@@ -37,8 +37,11 @@
 import org.apache.xindice.webadmin.webdav.WebdavStatus;
 import org.apache.xindice.webadmin.webdav.components.DAVComponent;
 import org.apache.xindice.xml.dom.DOMParser;
-import org.apache.xmlrpc.XmlRpc;
-import org.apache.xmlrpc.XmlRpcServer;
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.XmlRpcHandler;
+import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
+import org.apache.xmlrpc.server.XmlRpcServerConfigImpl;
+import org.apache.xmlrpc.webserver.XmlRpcServletServer;
 
 import org.w3c.dom.Document;
 
@@ -53,7 +56,6 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStream;
 
 /**
  * A <code>HttpServlet</code> that enables XML-RPC access to a Xindice
@@ -69,11 +71,10 @@
 
     private static final Log log = LogFactory.getLog(XindiceServlet.class);
 
-    private static final String DEFAULT_XMLRPC_DRIVER = "xerces";
     private static final String WEBADMIN_CONFIGURATION = "webadmin.configuration";
     private static final String MIMETABLE_CONFIGURATION = "mimetable.configuration";
 
-    protected XmlRpcServer xmlrpcServer;
+    protected XmlRpcServletServer server;
     protected WebAdminManager webAdmin;
 
 
@@ -152,41 +153,6 @@
                 log.info("Database '" + name + "' successfully opened");
             }
 
-            // Setup the XML-RPC impl to support UTF-8 input via Xerces.
-            XmlRpc.setEncoding("UTF8");
-
-            /*
-             * Setup the SAX parser XML-RPC impl will use.
-             * The XmlRpc.setDriver() method takes either the classname or a shorthand
-             * name for the SAX parser it will use.  The default (for backwards compatibility
-             * if nothing else) is xerces.
-             */
-            String xmlrpcDriver = DEFAULT_XMLRPC_DRIVER;
-
-            Configuration xmlRpcConfiguration = configuration.getChild("xml-rpc");
-            if (xmlRpcConfiguration != null) {
-                Configuration xmlRpcDriverConfiguration = xmlRpcConfiguration.getChild("driver");
-                if (xmlRpcDriverConfiguration != null) {
-                    // xmlrpcDriver will have non-empty value, guaranteed by providing default value
-                    xmlrpcDriver = xmlRpcDriverConfiguration.getAttribute("name", DEFAULT_XMLRPC_DRIVER);
-                }
-            }
-
-            try {
-                XmlRpc.setDriver(xmlrpcDriver);
-            } catch (Exception e) {
-                throw new ServletException("Failed to set driver for XmlRpc to: " + xmlrpcDriver, e);
-            }
-
-            // Create the XML-RPC server and add our handler as the default.
-            this.xmlrpcServer = new XmlRpcServer();
-            try {
-                this.xmlrpcServer.addHandler("$default", new RPCMessageInterface());
-            } catch (Exception e) {
-                throw new ServletException("Failed to add default handler to XmlRpc server.", e);
-            }
-
-            log.info("Xindice server successfully started");
         } catch (Exception e) {
             log.fatal("Failed to initialize database, throwing ServletException", e);
             // Make sure to close database if it was opened already.
@@ -194,6 +160,27 @@
             throw new ServletException("Error while handling the configuration", e);
         }
 
+        // Initialize XML-RPC
+        Configuration xmlRpcConfiguration = configuration.getChild("xml-rpc");
+        if (xmlRpcConfiguration != null) {
+            XmlRpcServerConfigImpl cfg = new XmlRpcServerConfigImpl();
+            // Setup the XML-RPC impl to support UTF-8 encoding
+            cfg.setEncoding("utf-8");
+            cfg.setKeepAliveEnabled(true);
+
+            // Create the XML-RPC server and add our handler as the default.
+            this.server = new XmlRpcServletServer();
+            this.server.setConfig(cfg);
+            this.server.setHandlerMapping(new XmlRpcHandlerMapping() {
+                public XmlRpcHandler getHandler(String s) throws XmlRpcException {
+                    return RPCMessageInterface.getHandler();
+                }
+            });
+
+            log.info("XML-RPC interface initialized.");
+        }
+
+        // Initialize WebAdmin
         try {
             String path = servletConfig.getInitParameter(WEBADMIN_CONFIGURATION);
             Document doc = loadFile(path, servletConfig);
@@ -209,6 +196,8 @@
         } catch(Exception e) {
             log.error("Could not process Mime Table configuration", e);
         }
+
+        log.info("Xindice server successfully started");
     }
 
     /**
@@ -329,11 +318,11 @@
 
         // xmlrpc requests do not have path (always '/') and are always POST
         if ("/".equals(path) && method.equalsIgnoreCase("POST")) {
-            byte[] result = xmlrpcServer.execute(request.getInputStream());
-            response.setContentType("text/xml");
-            response.setContentLength(result.length);
-            OutputStream output = response.getOutputStream();
-            output.write(result);
+            if (server != null) {
+                server.execute(request, response);
+            } else {
+                response.sendError(HttpServletResponse.SC_NOT_FOUND);
+            }
             return;
         }
 

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessage.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessage.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessage.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessage.java Fri Nov 16 12:49:03 2007
@@ -19,7 +19,7 @@
 
 package org.apache.xindice.server.rpc;
 
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  *
@@ -27,5 +27,5 @@
  */
 public interface RPCMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception;
+    public Map execute(Map message) throws Exception;
 }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessageInterface.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessageInterface.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessageInterface.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/RPCMessageInterface.java Fri Nov 16 12:49:03 2007
@@ -19,31 +19,49 @@
 
 package org.apache.xindice.server.rpc;
 
-import org.apache.xindice.core.DBException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.xindice.core.Collection;
+import org.apache.xindice.core.DBException;
 import org.apache.xindice.core.FaultCodes;
 import org.apache.xmlrpc.XmlRpcException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.xmlrpc.XmlRpcHandler;
+import org.apache.xmlrpc.XmlRpcRequest;
 
 import org.xmldb.api.base.ErrorCodes;
 import org.xmldb.api.base.XMLDBException;
 
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  *
  * @version $Revision$, $Date$
  */
-public final class RPCMessageInterface {
+public final class RPCMessageInterface implements XmlRpcHandler {
 
     private static final Log log = LogFactory.getLog(Collection.class);
 
     public static final String MESSAGE_PARAM = "message";
 
-    public Hashtable run(Hashtable message) throws Exception {
+    /**
+     * Single instance of handler is enough
+     */
+    private static final XmlRpcHandler INSTANCE = new RPCMessageInterface();
+
+
+    public static XmlRpcHandler getHandler() {
+        return INSTANCE;
+    }
+
+
+    private RPCMessageInterface() {
+    }
+
+    public Object execute(XmlRpcRequest xmlRpcRequest) throws XmlRpcException {
+        Map message = (Map) xmlRpcRequest.getParameter(0);
+
         // The method determines what class we load to handle the message.
-        String type = (String)message.get(MESSAGE_PARAM);
+        String type = (String) message.get(MESSAGE_PARAM);
         try {
             RPCMessage handler = (RPCMessage) Class.forName("org.apache.xindice.server.rpc.messages." + type).newInstance();
             return handler.execute(message);
@@ -52,19 +70,24 @@
                 log.debug("Exception while processing XmlRpc command " + type, e);
             }
 
-            throw new XmlRpcException(e.errorCode * FaultCodes.MAX_CODE + e.vendorErrorCode, e.getMessage());
+            throw new XmlRpcException(e.errorCode * FaultCodes.MAX_CODE + e.vendorErrorCode,
+                                      e.getMessage());
         } catch (DBException e) {
             if (log.isDebugEnabled()) {
                 log.debug("Exception while processing XmlRpc command " + type, e);
             }
 
-            throw new XmlRpcException(ErrorCodes.VENDOR_ERROR * FaultCodes.MAX_CODE + e.faultCode, e.getMessage());
+            //noinspection PointlessArithmeticExpression
+            throw new XmlRpcException(ErrorCodes.VENDOR_ERROR * FaultCodes.MAX_CODE + e.faultCode,
+                                      e.getMessage());
         } catch (Exception e) {
             if (log.isDebugEnabled()) {
                 log.debug("Exception while processing XmlRpc command " + type, e);
             }
 
-            throw e;
+            //noinspection PointlessArithmeticExpression
+            throw new XmlRpcException(ErrorCodes.UNKNOWN_ERROR * FaultCodes.MAX_CODE + FaultCodes.GEN_UNKNOWN,
+                                      e.getMessage());
         }
     }
 }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateCollection.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateCollection.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateCollection.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateCollection.java Fri Nov 16 12:49:03 2007
@@ -28,7 +28,8 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -36,7 +37,7 @@
  */
 public class CreateCollection extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -74,7 +75,7 @@
         Configuration config = new Configuration(doc.getDocumentElement(), false);
         colman.createCollection((String) message.get(NAME), config);
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, message.get(NAME));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateIndexer.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateIndexer.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateIndexer.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateIndexer.java Fri Nov 16 12:49:03 2007
@@ -28,7 +28,8 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -36,7 +37,7 @@
  */
 public class CreateIndexer extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -75,7 +76,7 @@
         Configuration config = new Configuration(doc.getDocumentElement(), false);
         col.createIndexer(config);
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, message.get(NAME));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateNewOID.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateNewOID.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateNewOID.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/CreateNewOID.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -30,7 +31,7 @@
  */
 public class CreateNewOID extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -38,7 +39,7 @@
 
         Collection col = getCollection((String) message.get(COLLECTION));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, col.createNewOID().toString());
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetApiVersion.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetApiVersion.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetApiVersion.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetApiVersion.java Fri Nov 16 12:49:03 2007
@@ -21,7 +21,8 @@
 
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -29,8 +30,8 @@
  */
 public class GetApiVersion extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
-        Hashtable result = new Hashtable();
+    public Map execute(Map message) throws Exception {
+        Map result = new HashMap(3);
         result.put(RESULT, API_NAME + " " + API_VERSION);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java Fri Nov 16 12:49:03 2007
@@ -21,10 +21,11 @@
 
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import org.xmldb.api.base.XMLDBException;
 import org.xmldb.api.base.ErrorCodes;
+import org.xmldb.api.base.XMLDBException;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -32,13 +33,13 @@
  */
 public class GetCollectionConfiguration extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         try {
             /* getCollection() throws an exception if collection doesnt exist */
             getCollection((String) message.get(COLLECTION));

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionCount.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionCount.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionCount.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionCount.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * XML-RPC message to list number of child collections in a collection
@@ -32,10 +33,10 @@
  */
 public class GetCollectionCount extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         Collection col = getCollection((String) message.get(COLLECTION));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, new Integer((int) col.countCollections()));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionMeta.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionMeta.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionMeta.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetCollectionMeta.java Fri Nov 16 12:49:03 2007
@@ -27,7 +27,8 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * XML-RPC message to fetch the meta data associated with a document
@@ -40,17 +41,17 @@
     /**
      * Return the MetaData object for the requested collection.
      *
-     * This method expects the Hashtable to contain the name of the collection
+     * This method expects the Map to contain the name of the collection
      * in the RPCDefaultMessage.COLLECTION key.  It will return an XML
      * representation of the MetaData object associated with this collection.
      * The XML will be stored in the RPCDefaultMessage.RESULT key.
      *
      * @param message the parameters passed to the xmlrpc method.
-     * @return Hashtable containing the XML for the requested MetaData object.
+     * @return Map containing the XML for the requested MetaData object.
      */
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         Collection col = getCollection((String) message.get(COLLECTION));
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         if (!col.isMetaEnabled()) {
             // meta information is not enabled !
             throw new Exception(MISSING_META_CONFIGURATION);

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocument.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocument.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocument.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocument.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  * @deprecated Replaced by {@link GetResource}
@@ -32,7 +32,7 @@
 
     private static final Log log = LogFactory.getLog(GetDocument.class);
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         log.warn("Please use GetResource instead. GetResource supports same as GetDocument, plus binary resources");
         return super.execute(message);
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentCount.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentCount.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentCount.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentCount.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -30,7 +31,7 @@
  */
 public class GetDocumentCount extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -38,7 +39,7 @@
 
         Collection col = getCollection((String) message.get(COLLECTION));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, new Integer((int) col.getDocumentCount()));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentMeta.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentMeta.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentMeta.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetDocumentMeta.java Fri Nov 16 12:49:03 2007
@@ -27,7 +27,8 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * XML-RPC message to fetch the meta data associated with a document
@@ -40,7 +41,7 @@
     /**
      * Return the MetaData object for the requested document.
      *
-     * This method expects the Hashtable to contain the name of the collection
+     * This method expects the Map to contain the name of the collection
      * in the RPCDefaultMessage.COLLECTION key, and the name of the document
      * in the RPCDefaultMessage.NAME key.
      * It will return an XML representation of the MetaData object associated
@@ -48,11 +49,10 @@
      * RPCDefaultMessage.RESULT key.
      *
      * @param message the parameters passed to the xmlrpc method.
-     * @return Hashtable containing the XML for the requested MetaData object.
+     * @return Map containing the XML for the requested MetaData object.
      */
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         Collection col = getCollection((String) message.get(COLLECTION));
-        Hashtable result = new Hashtable();
         if (!col.isMetaEnabled()) {
             // meta information is not enabled !
             throw new Exception(MISSING_META_CONFIGURATION);
@@ -66,6 +66,7 @@
         Document doc = new DocumentImpl();
         doc.appendChild(meta.streamToXML(doc, true));
 
+        Map result = new HashMap(3);
         result.put(RESULT, TextWriter.toString(doc));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetIndexerConfiguration.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetIndexerConfiguration.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetIndexerConfiguration.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetIndexerConfiguration.java Fri Nov 16 12:49:03 2007
@@ -23,7 +23,8 @@
 import org.apache.xindice.core.indexer.Indexer;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Check if an indexer in a particular collection exists...
@@ -34,13 +35,13 @@
  */
 public class GetIndexerConfiguration extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         try {
             Collection col = getCollection((String) message.get(COLLECTION));
             if (col == null) {

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetResource.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetResource.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetResource.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetResource.java Fri Nov 16 12:49:03 2007
@@ -30,7 +30,8 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -40,7 +41,7 @@
 
     private static final Log log = LogFactory.getLog(GetResource.class);
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -53,7 +54,7 @@
         Collection col = getCollection((String) message.get(COLLECTION));
         Entry obj = col.getEntry(message.get(NAME));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         if (obj == null) {
             // Return empty result
 

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetServerVersion.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetServerVersion.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetServerVersion.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/GetServerVersion.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.server.Xindice;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -30,8 +31,8 @@
  */
 public class GetServerVersion extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
-        Hashtable result = new Hashtable();
+    public Map execute(Map message) throws Exception {
+        Map result = new HashMap(3);
         result.put(RESULT, Xindice.Title + " " + Xindice.Version + " (" + Xindice.Codename + ")");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertDocument.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertDocument.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertDocument.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertDocument.java Fri Nov 16 12:49:03 2007
@@ -19,15 +19,10 @@
 
 package org.apache.xindice.server.rpc.messages;
 
-import org.apache.xindice.core.Collection;
-import org.apache.xindice.server.rpc.RPCDefaultMessage;
-import org.apache.xindice.xml.dom.DOMParser;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import org.w3c.dom.Document;
-
-import java.util.Hashtable;
+import java.util.Map;
 
 /**
  * @deprecated Replaced with InsertResource which also handles binary data
@@ -37,7 +32,7 @@
 
     private static final Log log = LogFactory.getLog(InsertDocument.class);
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         log.warn("Please use GetResource instead. GetResource supports same as GetDocument, plus binary resources");
         return super.execute(message);
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertResource.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertResource.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertResource.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/InsertResource.java Fri Nov 16 12:49:03 2007
@@ -25,15 +25,16 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
  * @version $Revision$, $Date$
  */
 public class InsertResource extends RPCDefaultMessage {
-    public Hashtable execute(Hashtable message) throws Exception {
 
+    public Map execute(Map message) throws Exception {
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
         }
@@ -72,7 +73,7 @@
             }
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, id);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListCollections.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListCollections.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListCollections.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListCollections.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Vector;
 
 /**
@@ -31,7 +32,7 @@
  */
 public class ListCollections extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -45,7 +46,7 @@
             list.addElement(cols[i]);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, list);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListDocuments.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListDocuments.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListDocuments.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListDocuments.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Vector;
 
 /**
@@ -31,7 +32,7 @@
  */
 public class ListDocuments extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -45,7 +46,7 @@
             docs.addElement(list[i]);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, docs);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListIndexers.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListIndexers.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListIndexers.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/ListIndexers.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Vector;
 
 /**
@@ -31,7 +32,7 @@
  */
 public class ListIndexers extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -45,7 +46,7 @@
             indexers.addElement(list[i]);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, indexers);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Query.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Query.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Query.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Query.java Fri Nov 16 12:49:03 2007
@@ -25,7 +25,8 @@
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 import org.apache.xindice.xml.NamespaceMap;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Executes a query against a document or collection
@@ -34,7 +35,7 @@
  */
 public class Query extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -51,7 +52,7 @@
         }
 
         Collection col = getCollection((String) message.get(COLLECTION));
-        NamespaceMap nsMap = QueryUtil.mapNamespaces((Hashtable) message.get(NAMESPACES));
+        NamespaceMap nsMap = QueryUtil.mapNamespaces((Map) message.get(NAMESPACES));
 
         NodeSet ns;
         if (message.containsKey(NAME)) {
@@ -60,7 +61,7 @@
             ns = col.queryCollection(type, query, nsMap);
         }
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, QueryUtil.queryResultsToString(ns));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java Fri Nov 16 12:49:03 2007
@@ -23,10 +23,11 @@
 import org.apache.xindice.core.FaultCodes;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import org.xmldb.api.base.XMLDBException;
 import org.xmldb.api.base.ErrorCodes;
+import org.xmldb.api.base.XMLDBException;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -34,7 +35,7 @@
  */
 public class RemoveCollection extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         final String parentName = (String) message.get(COLLECTION);
         if (parentName == null) {
@@ -58,8 +59,9 @@
                                      "Cannot remove child collection '" + childName + "': Parent collection '" + parentName + "' not found.");
         }
 
-        final Hashtable result = new Hashtable();
         col.dropCollection(col.getCollection(childName));
+
+        Map result = new HashMap(3);
         result.put(RESULT, "yes");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveDocument.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveDocument.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveDocument.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveDocument.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -30,7 +31,7 @@
  */
 public class RemoveDocument extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -41,10 +42,9 @@
         }
 
         Collection col = getCollection((String) message.get(COLLECTION));
-
         col.remove(message.get(NAME));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, "yes");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveIndexer.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveIndexer.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveIndexer.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/RemoveIndexer.java Fri Nov 16 12:49:03 2007
@@ -22,7 +22,8 @@
 import org.apache.xindice.core.Collection;
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -30,7 +31,7 @@
  */
 public class RemoveIndexer extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -41,10 +42,9 @@
         }
 
         Collection col = getCollection((String) message.get(COLLECTION));
-
         col.dropIndexer(col.getIndexer((String) message.get(NAME)));
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, "yes");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetCollectionMeta.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetCollectionMeta.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetCollectionMeta.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetCollectionMeta.java Fri Nov 16 12:49:03 2007
@@ -29,6 +29,8 @@
 import org.w3c.dom.Document;
 
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.HashMap;
 
 /**
  * XML-RPC message to set the meta data associated with a collection
@@ -41,16 +43,16 @@
     /**
      * Set the MetaData object for the requested collection.
      *
-     * This method expects the Hashtable to contain the name of the collection
+     * This method expects the Map to contain the name of the collection
      * in the RPCDefaultMessage.COLLECTION key, and the XML for the new MetaData
      * object in the RPCDefaultMessage.META key.  It will return an XML
      * representation of the MetaData object associated with this collection.
      * The XML will be stored in the RPCDefaultMessage.RESULT key.
      *
      * @param message the parameters passed to the xmlrpc method.
-     * @return Hashtable containing XML of the newly created MetaData object.
+     * @return Map containing XML of the newly created MetaData object.
      */
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -60,9 +62,7 @@
             throw new Exception(MISSING_META_PARAM);
         }
 
-        String collection = (String) message.get(COLLECTION);
-        Collection col = getCollection(collection);
-        Hashtable result = new Hashtable();
+        Collection col = getCollection((String) message.get(COLLECTION));
         if (!col.isMetaEnabled()) {
             // meta information is not enabled !
             throw new Exception(MISSING_META_CONFIGURATION);
@@ -78,6 +78,8 @@
         meta = col.getCollectionMeta();
         doc = new DocumentImpl();
         doc.appendChild(meta.streamToXML(doc, true));
+
+        Map result = new HashMap(3);
         result.put(RESULT, TextWriter.toString(doc));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocument.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocument.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocument.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocument.java Fri Nov 16 12:49:03 2007
@@ -25,7 +25,8 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -33,7 +34,7 @@
  */
 public class SetDocument extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
         }
@@ -56,7 +57,7 @@
         String id = (String) message.get(NAME);
         col.setDocument(id, doc);
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, id);
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocumentMeta.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocumentMeta.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocumentMeta.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/SetDocumentMeta.java Fri Nov 16 12:49:03 2007
@@ -28,7 +28,8 @@
 
 import org.w3c.dom.Document;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * XML-RPC message to set the meta data associated with a document
@@ -41,7 +42,7 @@
     /**
      * Set the MetaData object for the requested document.
      *
-     * This method expects the Hashtable to contain the name of the collection
+     * This method expects the Map to contain the name of the collection
      * in the RPCDefaultMessage.COLLECTION key, the name of the document in
      * the RPCDefaultMessage.NAME key, and the XML for the new MetaData
      * object in the RPCDefaultMessage.META key.  It will return an XML
@@ -49,9 +50,9 @@
      * document. The XML will be stored in the RPCDefaultMessage.RESULT key.
      *
      * @param message the parameters passed to the xmlrpc method.
-     * @return Hashtable containing XML of the newly created MetaData object.
+     * @return Map containing XML of the newly created MetaData object.
      */
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -63,10 +64,7 @@
             throw new Exception(MISSING_META_PARAM);
         }
 
-        String collection = (String) message.get(COLLECTION);
-        String docname = (String) message.get(NAME);
-        Collection col = getCollection(collection);
-        Hashtable result = new Hashtable();
+        Collection col = getCollection((String) message.get(COLLECTION));
         if (!col.isMetaEnabled()) {
             // meta information is not enabled !
             throw new Exception(MISSING_META_CONFIGURATION);
@@ -76,12 +74,16 @@
         MetaData meta = new MetaData();
         Document doc = DOMParser.toDocument((String) message.get(META));
         meta.streamFromXML(doc.getDocumentElement());
+
+        String docname = (String) message.get(NAME);
         col.setDocumentMeta(docname, meta);
 
         // Retreive stored meta data and sent back
         meta = col.getDocumentMeta(docname);
         doc = new DocumentImpl();
         meta.streamToXML(doc, true);
+
+        Map result = new HashMap(3);
         result.put(RESULT, TextWriter.toString(doc));
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Shutdown.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Shutdown.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Shutdown.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/Shutdown.java Fri Nov 16 12:49:03 2007
@@ -21,7 +21,8 @@
 
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * This message probably isn't necessary anymore.
@@ -30,10 +31,10 @@
  */
 public class Shutdown extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
         //Kernel.getKernel().shutDown(1);
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, "yes");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/UpdateIndexer.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/UpdateIndexer.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/UpdateIndexer.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/server/rpc/messages/UpdateIndexer.java Fri Nov 16 12:49:03 2007
@@ -21,7 +21,8 @@
 
 import org.apache.xindice.server.rpc.RPCDefaultMessage;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  *
@@ -29,7 +30,7 @@
  */
 public class UpdateIndexer extends RPCDefaultMessage {
 
-    public Hashtable execute(Hashtable message) throws Exception {
+    public Map execute(Map message) throws Exception {
 
         if (!message.containsKey(COLLECTION)) {
             throw new Exception(MISSING_COLLECTION_PARAM);
@@ -38,7 +39,7 @@
         // TODO: figure out what goes here.
         // Collection col = getCollection( (String) message.get(COLLECTION) );
 
-        Hashtable result = new Hashtable();
+        Map result = new HashMap(3);
         result.put(RESULT, "yes");
         return result;
     }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/util/SymbolDeserializer.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/util/SymbolDeserializer.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/util/SymbolDeserializer.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/util/SymbolDeserializer.java Fri Nov 16 12:49:03 2007
@@ -26,6 +26,7 @@
 import org.w3c.dom.Document;
 
 import java.util.Hashtable;
+import java.util.Map;
 
 /**
  * SymbolDeserializer is a utility class for managing SymbolTables in
@@ -69,7 +70,7 @@
      * @param buffer The Hashtable
      * @return The Symbol Table
      */
-    public SymbolTable getSymbols(Hashtable buffer) {
+    public SymbolTable getSymbols(Map buffer) {
         //if ( ((Long) buffer.get("timestamp")).longValue() != lastMod ) {
         // lastMod = ((Long) buffer.get("timestamp")).longValue();
 

Modified: xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/xml/NamespaceMap.java Fri Nov 16 12:49:03 2007
@@ -28,8 +28,6 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Enumeration;
-import java.util.Hashtable;
 
 /**
  * NamespaceMap is just a HashMap extension that provides some useful
@@ -38,15 +36,17 @@
  * @version $Revision$, $Date$
  */
 public final class NamespaceMap extends HashMap {
-    private Element elem = null;
 
+    private Element elem;
+
+    
     public NamespaceMap() {
     }
 
-    public NamespaceMap(Hashtable namespaces) {
-        for (Enumeration keys = namespaces.keys(); keys.hasMoreElements(); ) {
-            final String key = (String) keys.nextElement();
-            setNamespace(key, (String) namespaces.get(key));
+    public NamespaceMap(Map namespaces) {
+        for (Iterator i = namespaces.entrySet().iterator(); i.hasNext(); ) {
+            Map.Entry e = (Map.Entry) i.next();
+            setNamespace((String) e.getKey(), (String) e.getValue());
         }
     }
 

Added: xml/xindice/trunk/lib/ws-commons-util-1.0.2.jar
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/ws-commons-util-1.0.2.jar?rev=595817&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xml/xindice/trunk/lib/ws-commons-util-1.0.2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: xml/xindice/trunk/lib/xmlrpc-client-3.1.jar
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/xmlrpc-client-3.1.jar?rev=595817&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xml/xindice/trunk/lib/xmlrpc-client-3.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: xml/xindice/trunk/lib/xmlrpc-common-3.1.jar
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/xmlrpc-common-3.1.jar?rev=595817&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xml/xindice/trunk/lib/xmlrpc-common-3.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: xml/xindice/trunk/lib/xmlrpc-server-3.1.jar
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/xmlrpc-server-3.1.jar?rev=595817&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xml/xindice/trunk/lib/xmlrpc-server-3.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml (original)
+++ xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Fri Nov 16 12:49:03 2007
@@ -54,7 +54,7 @@
       <title>Xindice 1.2 Release Plan</title>
       <ul>
         <li>
-          <strong>Java</strong> Revisit minimum JDK requirement. [VG] (Done)
+          <strong>Java</strong> Revisit minimum JDK requirement. (Done)
         </li>
         <li>
           <strong>Database Lock</strong> Place a lock on database files using
@@ -66,7 +66,7 @@
           the main codebase, instead of ugly debug tool. (Done)
         </li>
         <li>
-          <strong>XML-RPC</strong> Update to XML-RPC release 3.0 or newer.
+          <strong>XML-RPC</strong> Update to XML-RPC release 3.0 or newer. (Done)
         </li>
         <li>
           <strong>XML-RPC</strong> Extend Xindice XML-RPC API to optimize transmission
@@ -77,7 +77,7 @@
           <strong>Caching</strong> Revisit implementation of documents cache in
           the core Collection class. Clarify caching semantics, implement caching
           for all use cases (compressed, uncompressed, binary objects). Ensure
-          dirty data can not be placed in the cache. [VG]
+          dirty data can not be placed in the cache. [VG] (In Progress)
         </li>
         <li>
           <strong>Admin Tool</strong> DatabaseRebuild utility implements just one of
@@ -92,7 +92,6 @@
         </li>
         <li>
           <strong>FullText</strong> Implement full text indexing and searching.
-          See scratchpad for some code.
         </li>
         <li>
           <strong>Entity Catalogue</strong> Xindice should have internal XML entity

Modified: xml/xindice/trunk/status.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/status.xml?rev=595817&r1=595816&r2=595817&view=diff
==============================================================================
--- xml/xindice/trunk/status.xml (original)
+++ xml/xindice/trunk/status.xml Fri Nov 16 12:49:03 2007
@@ -114,6 +114,9 @@
 
   <changes>
     <release version="1.2" date="unreleased">
+      <action dev="VG" type="update">
+        Update XML-RPC library to the version 3.1.
+      </action>
       <action dev="NS" type="add" due-to="Andy Armstrong">
         Add full text indexer. It allows to search documents using Lucene
         queries. Add lucene-core 2.2.0.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.