jbates      02/05/03 09:29:03

  Modified:    config   system.xml
               java/scratchpad/src/org/apache/xindice/client/rpc
                        CollectionImpl.java
               java/scratchpad/src/org/apache/xindice/server/rpc
                        RPCMessageHandler.java
               java/src/org/apache/xindice/tools XMLTools.java
  Log:
  Initial fixes to the XML:DB driver for the XML-RPC connection to the server
  
  Revision  Changes    Path
  1.3       +3 -0      xml-xindice/config/system.xml
  
  Index: system.xml
  ===================================================================
  RCS file: /home/cvs/xml-xindice/config/system.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- system.xml        7 Feb 2002 09:40:35 -0000       1.2
  +++ system.xml        3 May 2002 16:29:02 -0000       1.3
  @@ -7,6 +7,7 @@
         preferable way to change the system configuration.
   -->
      <server gcinterval="0">
  +
         <services class="org.apache.xindice.server.standard.StdServiceManager">
            <service class="org.apache.xindice.server.services.XindiceService" 
name="Xindice">
               <root-collection dbroot="./db/" name="db" security="false">
  @@ -99,6 +100,8 @@
                  <icon ext="png" path="/icons/image.gif" />
               </icons>
            </component>
  +         <component class="org.apache.xindice.server.rpc.RPCMessageHandler"
  +                 name="RPCHandler"/>
         </components>
         <scripts class="org.apache.xindice.server.standard.StdScriptManager" 
exceptions="yes" scriptdir="./scripts/" stablescripts="yes" />
      </server>
  
  
  
  1.2       +4 -4      
xml-xindice/java/scratchpad/src/org/apache/xindice/client/rpc/CollectionImpl.java
  
  Index: CollectionImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/scratchpad/src/org/apache/xindice/client/rpc/CollectionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CollectionImpl.java       30 Apr 2002 13:10:14 -0000      1.1
  +++ CollectionImpl.java       3 May 2002 16:29:02 -0000       1.2
  @@ -54,7 +54,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * $Id: CollectionImpl.java,v 1.1 2002/04/30 13:10:14 jbates Exp $
  + * $Id: CollectionImpl.java,v 1.2 2002/05/03 16:29:02 jbates Exp $
    */
   
   package org.apache.xindice.client.rpc;
  @@ -83,8 +83,8 @@
   
       /* Named service classes map to instantiate for each collection */
       private static String[] serviceClassesMap =
  -    { "org.apache.xindice.client.services.XPathQueryServiceImpl",
  -      "org.apache.xindice.client.services.XUpdateQueryServiceImpl" };
  +    { /* "org.apache.xindice.client.services.XPathQueryServiceImpl",
  +      "org.apache.xindice.client.services.XUpdateQueryServiceImpl" */ };
         
       /* Instantiated named services map */
       private Hashtable servicesMap = new Hashtable();
  @@ -314,7 +314,7 @@
        */
       public boolean isOpen() {
   
  -       return (client == null);
  +       return (client != null);
       }
       
       /**
  
  
  
  1.5       +4 -2      
xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/RPCMessageHandler.java
  
  Index: RPCMessageHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/RPCMessageHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RPCMessageHandler.java    30 Apr 2002 13:10:14 -0000      1.4
  +++ RPCMessageHandler.java    3 May 2002 16:29:02 -0000       1.5
  @@ -56,7 +56,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * $Id: RPCMessageHandler.java,v 1.4 2002/04/30 13:10:14 jbates Exp $
  + * $Id: RPCMessageHandler.java,v 1.5 2002/05/03 16:29:02 jbates Exp $
    */
   
   /**
  @@ -92,7 +92,8 @@
          }
          
          xmlrpc = new XmlRpcServer();
  -       xmlrpc.addHandler ("$default", new RPCMessageInterface());       
  +       xmlrpc.addHandler ("$default", new RPCMessageInterface());
  +       System.out.println("XML-RPC handler started...");
       }
   
       public void setKernel(Kernel kernel) {
  @@ -121,6 +122,7 @@
             return true;
          }
          
  +       System.out.println("Handling an RPC request");
          // We only handle POST requests
          if ( ! gateway.getRequestHeader("REQUEST_METHOD").equals("POST") ) {
             return true;
  
  
  
  1.2       +7 -1      
xml-xindice/java/src/org/apache/xindice/tools/XMLTools.java
  
  Index: XMLTools.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/src/org/apache/xindice/tools/XMLTools.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLTools.java     6 Dec 2001 19:33:57 -0000       1.1
  +++ XMLTools.java     3 May 2002 16:29:03 -0000       1.2
  @@ -56,7 +56,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * $Id: XMLTools.java,v 1.1 2001/12/06 19:33:57 bradford Exp $
  + * $Id: XMLTools.java,v 1.2 2002/05/03 16:29:03 jbates Exp $
    */
   
   import org.xmldb.api.base.*;
  @@ -322,6 +322,12 @@
                      String dbURI = (String) table.get( URI );
                      db.setProperty( "xindice.naming.ior", dbURI);
                  }
  +               DatabaseManager.registerDatabase( db );
  +               
  +               // Also register XML-RPC driver so it is available to the
  +               // cmd-line tools.
  +               db = (Database) Class.forName(
  +                        
"org.apache.xindice.client.rpc.DatabaseImpl").newInstance();
                  DatabaseManager.registerDatabase( db );
              }
   
  
  
  

Reply via email to