You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by rs...@apache.org on 2002/08/23 02:33:41 UTC

cvs commit: xml-axis/java/src/org/apache/axis/client ServiceFactory.java Service.java AxisClient.java

rsitze      2002/08/22 17:33:41

  Modified:    java/src/org/apache/axis/transport/http AxisServletBase.java
                        AxisServlet.java AdminServlet.java
               java/src/org/apache/axis/configuration
                        ServletEngineConfigurationFactory.java
                        DefaultEngineConfigurationFactory.java
               java/src/org/apache/axis/server AxisServer.java
               java/src/org/apache/axis/client ServiceFactory.java
                        Service.java AxisClient.java
  Added:       java/src/org/apache/axis/configuration
                        EngineConfigurationFactoryFactory.java
                        EngineConfigurationFactoryDefault.java
                        EngineConfigurationFactoryServlet.java
  Log:
  1.  Separated the EngineConfigurationFactoryFactory from
      the two predominate EngineConfigurationFactorys.
  2.  Left backward compatible place-holders.
  3.  Implemented EngineConfigurationFactoryFactory using discovery...
  4.  BTW, for anyone curious about 'why' I'm pushing discovery through
  this, think JDK 1.3 Services declarations via
      META-INF/services/org.apache.axis.EngineConfigurationFactory
  (and likewise for all other plugpoints implemented via discovery).
  
  Revision  Changes    Path
  1.12      +2 -2      xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java
  
  Index: AxisServletBase.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AxisServletBase.java	15 Aug 2002 06:59:55 -0000	1.11
  +++ AxisServletBase.java	23 Aug 2002 00:33:40 -0000	1.12
  @@ -57,7 +57,7 @@
   
   import org.apache.axis.*;
   import org.apache.axis.utils.JavaUtils;
  -import org.apache.axis.configuration.ServletEngineConfigurationFactory;
  +import org.apache.axis.configuration.EngineConfigurationFactoryFactory;
   import org.apache.axis.server.AxisServer;
   
   import org.apache.axis.components.logger.LogFactory;
  @@ -277,7 +277,7 @@
                               webInfPath + File.separator + "attachments");
   
           EngineConfiguration config =
  -            (new ServletEngineConfigurationFactory(context))
  +            EngineConfigurationFactoryFactory.newServletFactory(context)
                       .getServerEngineConfig();
   
           environment.put(EngineConfiguration.PROPERTY_NAME, config);
  
  
  
  1.138     +17 -25    xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- AxisServlet.java	20 Aug 2002 04:57:13 -0000	1.137
  +++ AxisServlet.java	23 Aug 2002 00:33:40 -0000	1.138
  @@ -55,19 +55,30 @@
   
   package org.apache.axis.transport.http ;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.File;
  +import java.io.IOException;
  +import java.io.PrintWriter;
  +import java.util.ArrayList;
  +import java.util.Enumeration;
  +import java.util.Iterator;
  +
  +import javax.servlet.ServletContext;
  +import javax.servlet.ServletException;
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
  +import javax.servlet.http.HttpUtils;
  +import javax.xml.soap.SOAPException;
  +
   import org.apache.axis.AxisEngine;
   import org.apache.axis.AxisFault;
  -import org.apache.axis.AxisProperties;
   import org.apache.axis.Constants;
   import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
  -import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.handlers.soap.SOAPService;
  -import org.apache.axis.description.ServiceDesc;
   import org.apache.axis.description.OperationDesc;
  -import org.apache.axis.configuration.ServletEngineConfigurationFactory;
  +import org.apache.axis.description.ServiceDesc;
  +import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.security.servlet.ServletSecurityProvider;
  -import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.Admin;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.XMLUtils;
  @@ -76,25 +87,6 @@
   import org.apache.commons.logging.Log;
   
   import org.w3c.dom.Document;
  -
  -import javax.servlet.ServletContext;
  -import javax.servlet.ServletException;
  -import javax.servlet.http.HttpServlet;
  -import javax.servlet.http.HttpServletRequest;
  -import javax.servlet.http.HttpServletResponse;
  -import javax.servlet.http.HttpUtils;
  -import javax.xml.soap.SOAPException;
  -
  -import java.io.File;
  -import java.io.ByteArrayInputStream;
  -import java.io.IOException;
  -import java.io.PrintWriter;
  -
  -import java.util.Enumeration;
  -import java.util.HashMap;
  -import java.util.Map;
  -import java.util.Iterator;
  -import java.util.ArrayList;
   
   /**
    *
  
  
  
  1.17      +7 -10     xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java
  
  Index: AdminServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AdminServlet.java	15 Aug 2002 06:59:55 -0000	1.16
  +++ AdminServlet.java	23 Aug 2002 00:33:41 -0000	1.17
  @@ -55,20 +55,17 @@
   
   package org.apache.axis.transport.http ;
   
  -import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.configuration.ServletEngineConfigurationFactory;
  -import org.apache.axis.server.AxisServer;
  -import org.apache.axis.utils.JavaUtils;
  -import org.apache.axis.AxisFault;
  -import org.apache.axis.components.logger.LogFactory;
  -import org.apache.commons.logging.Log;
  +import java.io.IOException;
   
  -import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
  -import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  -import java.io.IOException;
  +
  +import org.apache.axis.server.AxisServer;
  +import org.apache.axis.utils.JavaUtils;
  +
  +import org.apache.axis.components.logger.LogFactory;
  +import org.apache.commons.logging.Log;
   
   /**
    * Proof-of-concept "management" servlet for Axis.
  
  
  
  1.12      +11 -85    xml-axis/java/src/org/apache/axis/configuration/ServletEngineConfigurationFactory.java
  
  Index: ServletEngineConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/ServletEngineConfigurationFactory.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ServletEngineConfigurationFactory.java	12 Aug 2002 22:35:56 -0000	1.11
  +++ ServletEngineConfigurationFactory.java	23 Aug 2002 00:33:41 -0000	1.12
  @@ -55,95 +55,21 @@
   
   package org.apache.axis.configuration;
   
  -import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.ConfigurationException;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.apache.axis.components.logger.LogFactory;
  -import org.apache.commons.logging.Log;
  -
   import javax.servlet.ServletContext;
   
  -import java.io.File;
  -import java.io.InputStream;
  -
   /**
  - * This is a default implementation of ServletEngineConfigurationFactory.
  - * It is user-overrideable by a system property without affecting
  - * the caller. If you decide to override it, use delegation if
  - * you want to inherit the behaviour of this class as using
  - * class extension will result in tight loops. That is, your
  - * class should implement EngineConfigurationFactory and keep
  - * an instance of this class in a member field and delegate
  - * methods to that instance when the default behaviour is
  - * required.
  - *
  - * @author Davanum Srinivas (dims@apache.org)
  + * This is a 'front' for replacement logic.
  + * Use EngineConfigurationFactoryFactory.newServletFactory().
  + * 
  + * @author Richard A. Sitze
  + * @author Glyn Normington (glyn@apache.org)
  + * 
  + * @deprecated
    */
  -public class ServletEngineConfigurationFactory extends DefaultEngineConfigurationFactory {
  -    protected static Log log =
  -        LogFactory.getLog(ServletEngineConfigurationFactory.class.getName());
  -
  -    private ServletContext ctx;
  -    
  -    /**
  -     * Create the default engine configuration and detect whether the user
  -     * has overridden this with their own.
  -     */
  +public class ServletEngineConfigurationFactory
  +    extends DefaultEngineConfigurationFactory
  +{
       public ServletEngineConfigurationFactory(ServletContext ctx) {
  -        super();
  -        this.ctx = ctx;
  -    }
  -
  -    /**
  -     * Get a default server engine configuration.
  -     *
  -     * @return a server EngineConfiguration
  -     */
  -    public EngineConfiguration getServerEngineConfig() {
  -        return getServerEngineConfig(ctx);
  -    }
  -
  -    /**
  -     * Get a default server engine configuration in a servlet environment.
  -     *
  -     * @param ctx a ServletContext
  -     * @return a server EngineConfiguration
  -     */
  -    private EngineConfiguration getServerEngineConfig(ServletContext ctx) {
  -        if (userFactory == null) {
  -            /*
  -             * Use the WEB-INF directory (so the config files can't get
  -             * snooped by a browser)
  -             */
  -            String webInfPath = ctx.getRealPath("/WEB-INF");
  - 
  -            FileProvider config = null ;
  -
  -            if (webInfPath == null || !(new File(webInfPath,
  -                                                 SERVER_CONFIG_FILE)).exists()){
  -                InputStream is = ctx.getResourceAsStream("/WEB-INF/"+
  -                                                         SERVER_CONFIG_FILE);
  -                if (is == null) {
  -                    log.error(JavaUtils.getMessage
  -                              ("servletEngineWebInfError01", 
  -                               webInfPath + "/" + SERVER_CONFIG_FILE));
  -                } else {
  -                    config = new FileProvider(is);
  -                }
  -            }
  -            if ( config == null ) {
  -                try {
  -                    config = new FileProvider(webInfPath,
  -                                              SERVER_CONFIG_FILE);
  -                } catch (ConfigurationException ex) {
  -                    log.error(JavaUtils.getMessage
  -                              ("servletEngineWebInfError00"), ex);
  -                }
  -            }
  -            return config;
  -        } else {
  -            return userFactory.getServerEngineConfig();
  -        }
  +        super(EngineConfigurationFactoryFactory.newServletFactory(ctx));
       }
   }
  
  
  
  1.18      +17 -63    xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java
  
  Index: DefaultEngineConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DefaultEngineConfigurationFactory.java	2 Aug 2002 17:27:43 -0000	1.17
  +++ DefaultEngineConfigurationFactory.java	23 Aug 2002 00:33:41 -0000	1.18
  @@ -55,72 +55,34 @@
   
   package org.apache.axis.configuration;
   
  -import org.apache.axis.AxisEngine;
  -import org.apache.axis.AxisProperties;
  -import org.apache.axis.EngineConfigurationFactory;
   import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.utils.ClassUtils;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.apache.axis.components.logger.LogFactory;
  -import org.apache.commons.logging.Log;
  +import org.apache.axis.EngineConfigurationFactory;
   
   
   /**
  - * This is a default implementation of EngineConfigurationFactory.
  - * It is user-overrideable by a system property without affecting
  - * the caller. If you decide to override it, use delegation if
  - * you want to inherit the behaviour of this class as using
  - * class extension will result in tight loops. That is, your
  - * class should implement EngineConfigurationFactory and keep
  - * an instance of this class in a member field and delegate
  - * methods to that instance when the default behaviour is
  - * required.
  - *
  + * This is a 'front' for replacement logic.
  + * Use EngineConfigurationFactoryFactory.newFactory().
  + * 
  + * @author Richard A. Sitze
    * @author Glyn Normington (glyn@apache.org)
  + * 
  + * @deprecated
    */
  -public class DefaultEngineConfigurationFactory implements EngineConfigurationFactory
  +public class DefaultEngineConfigurationFactory
  +    implements EngineConfigurationFactory
   {
  -    protected static Log log =
  -        LogFactory.getLog(DefaultEngineConfigurationFactory.class.getName());
  -
  -    protected static final String CLIENT_CONFIG_FILE = "client-config.wsdd";
  -    protected static final String SERVER_CONFIG_FILE = "server-config.wsdd";
  -
  -    protected EngineConfigurationFactory userFactory = null;
  -
  -    private String clientConfigFile;
  -
  -    private String serverConfigFile;
  +    protected final EngineConfigurationFactory factory;
  +    
  +    protected DefaultEngineConfigurationFactory(EngineConfigurationFactory factory) {
  +        this.factory = factory;
  +    }
   
       /**
        * Create the default engine configuration and detect whether the user
        * has overridden this with their own.
        */
       public DefaultEngineConfigurationFactory() {
  -        String fClassName =
  -            AxisProperties.getProperty(EngineConfigurationFactory.SYSTEM_PROPERTY_NAME);
  -
  -        if (fClassName != null) {
  -            try {
  -                userFactory = (EngineConfigurationFactory)
  -                        ClassUtils.forName(fClassName).newInstance();
  -            } catch (Exception e) {
  -                // Report diagnostics but use the default factory.
  -                log.error(JavaUtils.getMessage("exception00"), e);
  -            }
  -        }
  -
  -        clientConfigFile = AxisProperties.getProperty("axis.ClientConfigFile");
  -        if (clientConfigFile == null) {
  -            clientConfigFile = CLIENT_CONFIG_FILE;
  -        }
  -
  -        serverConfigFile = AxisProperties.getProperty("axis.ServerConfigFile");
  -        if (serverConfigFile == null) {
  -            serverConfigFile = SERVER_CONFIG_FILE;
  -        }
  -        
  +        this(EngineConfigurationFactoryFactory.newFactory());
       }
   
        /**
  @@ -129,11 +91,7 @@
        * @return a client EngineConfiguration
        */
       public EngineConfiguration getClientEngineConfig() {
  -        if (userFactory == null) {
  -            return new FileProvider(clientConfigFile);
  -        } else {
  -            return userFactory.getClientEngineConfig();
  -        }
  +        return factory.getClientEngineConfig();
       }
   
       /**
  @@ -142,10 +100,6 @@
        * @return a server EngineConfiguration
        */
       public EngineConfiguration getServerEngineConfig() {
  -        if (userFactory == null) {
  -            return new FileProvider(serverConfigFile);
  -        } else {
  -            return userFactory.getServerEngineConfig();
  -        }
  +        return factory.getServerEngineConfig();
       }
   }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryFactory.java
  
  Index: EngineConfigurationFactoryFactory.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.configuration;
  
  import javax.servlet.ServletContext;
  import org.apache.axis.AxisProperties;
  import org.apache.axis.EngineConfigurationFactory;
  import org.apache.axis.components.logger.LogFactory;
  import org.apache.commons.discovery.base.SPInterface;
  import org.apache.commons.logging.Log;
  
  
  /**
   * This is a default implementation of EngineConfigurationFactory.
   * It is user-overrideable by a system property without affecting
   * the caller. If you decide to override it, use delegation if
   * you want to inherit the behaviour of this class as using
   * class extension will result in tight loops. That is, your
   * class should implement EngineConfigurationFactory and keep
   * an instance of this class in a member field and delegate
   * methods to that instance when the default behaviour is
   * required.
   *
   * @author Richard A. Sitze
   */
  public class EngineConfigurationFactoryFactory
  {
      protected static Log log =
          LogFactory.getLog(EngineConfigurationFactoryFactory.class.getName());
  
      /**
       * Create the default engine configuration and detect whether the user
       * has overridden this with their own.
       */
      private EngineConfigurationFactoryFactory() {
      }
  
      public static EngineConfigurationFactory newFactory() {
          return (EngineConfigurationFactory)AxisProperties.newInstance(
                  new SPInterface(EngineConfigurationFactory.class,
                                  EngineConfigurationFactory.SYSTEM_PROPERTY_NAME),
                  EngineConfigurationFactoryDefault.class);
      }
  
      public static EngineConfigurationFactoryServlet newServletFactory(ServletContext ctx) {
          return (EngineConfigurationFactoryServlet)AxisProperties.newInstance(
                  new SPInterface(EngineConfigurationFactory.class,
                                  EngineConfigurationFactory.SYSTEM_PROPERTY_NAME,
                                  new Class[] { ServletContext.class },
                                  new Object[] { ctx }),
                  EngineConfigurationFactoryServlet.class);
      }
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryDefault.java
  
  Index: EngineConfigurationFactoryDefault.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.configuration;
  
  import org.apache.axis.AxisProperties;
  import org.apache.axis.EngineConfiguration;
  import org.apache.axis.EngineConfigurationFactory;
  import org.apache.axis.components.logger.LogFactory;
  import org.apache.commons.logging.Log;
  
  
  /**
   * This is a default implementation of EngineConfigurationFactory.
   * It is user-overrideable by a system property without affecting
   * the caller. If you decide to override it, use delegation if
   * you want to inherit the behaviour of this class as using
   * class extension will result in tight loops. That is, your
   * class should implement EngineConfigurationFactory and keep
   * an instance of this class in a member field and delegate
   * methods to that instance when the default behaviour is
   * required.
   *
   * @author Richard A. Sitze
   * @author Glyn Normington (glyn@apache.org)
   */
  public class EngineConfigurationFactoryDefault
      implements EngineConfigurationFactory
  {
      protected static Log log =
          LogFactory.getLog(EngineConfigurationFactoryDefault.class.getName());
  
      public final String OPTION_CLIENT_CONFIG_FILE = "axis.ClientConfigFile";
      public final String OPTION_SERVER_CONFIG_FILE = "axis.ServerConfigFile";
  
      protected static final String CLIENT_CONFIG_FILE = "client-config.wsdd";
      protected static final String SERVER_CONFIG_FILE = "server-config.wsdd";
  
      private String clientConfigFile;
  
      private String serverConfigFile;
  
      /**
       * Create the default engine configuration and detect whether the user
       * has overridden this with their own.
       */
      public EngineConfigurationFactoryDefault() {
          clientConfigFile = AxisProperties.getProperty(OPTION_CLIENT_CONFIG_FILE,
                                                        CLIENT_CONFIG_FILE);
  
          serverConfigFile = AxisProperties.getProperty(OPTION_SERVER_CONFIG_FILE,
                                                        SERVER_CONFIG_FILE);
      }
  
       /**
       * Get a default client engine configuration.
       *
       * @return a client EngineConfiguration
       */
      public EngineConfiguration getClientEngineConfig() {
          return new FileProvider(clientConfigFile);
      }
  
      /**
       * Get a default server engine configuration.
       *
       * @return a server EngineConfiguration
       */
      public EngineConfiguration getServerEngineConfig() {
          return new FileProvider(serverConfigFile);
      }
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java
  
  Index: EngineConfigurationFactoryServlet.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.configuration;
  
  import java.io.File;
  import java.io.InputStream;
  
  import javax.servlet.ServletContext;
  import org.apache.axis.ConfigurationException;
  import org.apache.axis.EngineConfiguration;
  import org.apache.axis.components.logger.LogFactory;
  import org.apache.axis.utils.JavaUtils;
  import org.apache.commons.logging.Log;
  
  /**
   * This is a default implementation of ServletEngineConfigurationFactory.
   * It is user-overrideable by a system property without affecting
   * the caller. If you decide to override it, use delegation if
   * you want to inherit the behaviour of this class as using
   * class extension will result in tight loops. That is, your
   * class should implement EngineConfigurationFactory and keep
   * an instance of this class in a member field and delegate
   * methods to that instance when the default behaviour is
   * required.
   *
   * @author Richard A. Sitze
   * @author Davanum Srinivas (dims@apache.org)
   */
  public class EngineConfigurationFactoryServlet
      extends EngineConfigurationFactoryDefault
  {
      protected static Log log =
          LogFactory.getLog(EngineConfigurationFactoryServlet.class.getName());
  
      private ServletContext ctx;
      
      /**
       * Create the default engine configuration and detect whether the user
       * has overridden this with their own.
       */
      public EngineConfigurationFactoryServlet(ServletContext ctx) {
          super();
          this.ctx = ctx;
      }
  
      /**
       * Get a default server engine configuration.
       *
       * @return a server EngineConfiguration
       */
      public EngineConfiguration getServerEngineConfig() {
          return getServerEngineConfig(ctx);
      }
  
      /**
       * Get a default server engine configuration in a servlet environment.
       *
       * @param ctx a ServletContext
       * @return a server EngineConfiguration
       */
      private EngineConfiguration getServerEngineConfig(ServletContext ctx) {
          /*
           * Use the WEB-INF directory (so the config files can't get
           * snooped by a browser)
           */
          String webInfPath = ctx.getRealPath("/WEB-INF");
   
              FileProvider config = null ;
  
              if (webInfPath == null || !(new File(webInfPath,
                                                   SERVER_CONFIG_FILE)).exists()){
                  InputStream is = ctx.getResourceAsStream("/WEB-INF/"+
                                                       SERVER_CONFIG_FILE);
              if (is == null) {
                  log.error(JavaUtils.getMessage
                            ("servletEngineWebInfError01", 
                             webInfPath + "/" + SERVER_CONFIG_FILE));
              } else {
                  config = new FileProvider(is);
              }
          }
          if ( config == null ) {
              try {
                  config = new FileProvider(webInfPath,
                                            SERVER_CONFIG_FILE);
              } catch (ConfigurationException ex) {
                  log.error(JavaUtils.getMessage
                            ("servletEngineWebInfError00"), ex);
              }
          }
          return config;
      }
  }
  
  
  
  1.78      +2 -2      xml-axis/java/src/org/apache/axis/server/AxisServer.java
  
  Index: AxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- AxisServer.java	4 Aug 2002 03:27:24 -0000	1.77
  +++ AxisServer.java	23 Aug 2002 00:33:41 -0000	1.78
  @@ -64,7 +64,7 @@
   import org.apache.axis.MessageContext;
   import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.client.AxisClient;
  -import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.EngineConfigurationFactoryFactory;
   import org.apache.axis.utils.ClassUtils;
   import org.apache.axis.utils.JavaUtils;
   
  @@ -117,7 +117,7 @@
   
       public AxisServer()
       {
  -        this((new DefaultEngineConfigurationFactory()).getServerEngineConfig());
  +        this(EngineConfigurationFactoryFactory.newFactory().getServerEngineConfig());
       }
   
       public AxisServer(EngineConfiguration config)
  
  
  
  1.15      +3 -2      xml-axis/java/src/org/apache/axis/client/ServiceFactory.java
  
  Index: ServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceFactory.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ServiceFactory.java	13 Aug 2002 11:48:41 -0000	1.14
  +++ ServiceFactory.java	23 Aug 2002 00:33:41 -0000	1.15
  @@ -57,7 +57,7 @@
   
   import org.apache.axis.EngineConfiguration;
   
  -import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.EngineConfigurationFactoryFactory;
   import org.apache.axis.utils.ClassUtils;
   
   import javax.naming.Context;
  @@ -98,7 +98,8 @@
       public static final String SERVICE_LOCAL_PART = "service local part";
   
       private static EngineConfiguration defaultEngineConfig =
  -        (new DefaultEngineConfigurationFactory()).getClientEngineConfig();
  +        EngineConfigurationFactoryFactory.newFactory().getClientEngineConfig();
  +
       private static ThreadLocal threadDefaultConfig = new ThreadLocal();
   
       public static void setThreadDefaultConfig(EngineConfiguration config)
  
  
  
  1.70      +2 -2      xml-axis/java/src/org/apache/axis/client/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Service.java	20 Aug 2002 13:35:04 -0000	1.69
  +++ Service.java	23 Aug 2002 00:33:41 -0000	1.70
  @@ -58,7 +58,7 @@
   import javax.wsdl.extensions.soap.SOAPAddress;
   import org.apache.axis.AxisEngine;
   import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.EngineConfigurationFactoryFactory;
   import org.apache.axis.utils.ClassUtils;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.WSDLUtils;
  @@ -108,7 +108,7 @@
   public class Service implements javax.xml.rpc.Service, Serializable, Referenceable {
       private transient AxisEngine          engine = null;
       private transient EngineConfiguration config =
  -        (new DefaultEngineConfigurationFactory()).getClientEngineConfig();
  +        EngineConfigurationFactoryFactory.newFactory().getClientEngineConfig();
   
       private QName               serviceName     = null ;
       private URL                 wsdlLocation    = null ;
  
  
  
  1.51      +2 -3      xml-axis/java/src/org/apache/axis/client/AxisClient.java
  
  Index: AxisClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AxisClient.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- AxisClient.java	4 Aug 2002 03:17:50 -0000	1.50
  +++ AxisClient.java	23 Aug 2002 00:33:41 -0000	1.51
  @@ -60,7 +60,7 @@
   import org.apache.axis.EngineConfiguration;
   import org.apache.axis.Handler;
   import org.apache.axis.MessageContext;
  -import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.EngineConfigurationFactoryFactory;
   import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.utils.JavaUtils;
   
  @@ -86,8 +86,7 @@
       }
       
       public AxisClient() {
  -        this((new DefaultEngineConfigurationFactory()).
  -             getClientEngineConfig());
  +        this(EngineConfigurationFactoryFactory.newFactory().getClientEngineConfig());
       }
   
       /**