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 de...@apache.org on 2005/11/26 14:10:22 UTC

svn commit: r349113 [1/2] - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/description/ core/src/org/apache/a...

Author: deepal
Date: Sat Nov 26 05:09:20 2005
New Revision: 349113

URL: http://svn.apache.org/viewcvs?rev=349113&view=rev
Log:
 1. Did modification require to support parameter serialization 
 2. did some refactoring 
 3. Improved module engagement and phase rules 

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AbstractDispatcher.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisObserver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/AxisObserverImpl.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Sat Nov 26 05:09:20 2005
@@ -40,11 +40,7 @@
            __operation = new org.apache.axis2.description.OutInAxisOperation();
            __operation.setName(new javax.xml.namespace.QName("<xsl:value-of select="@namespace"/>", "<xsl:value-of select="@name"/>"));
            _operations[<xsl:value-of select="position()-1"/>]=__operation;
-            try{
            _service.addOperation(__operation);
-          }catch(org.apache.axis2.AxisFault e){
-            throw new RuntimeException(e);
-          }
      </xsl:for-each>
        }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java Sat Nov 26 05:09:20 2005
@@ -3,37 +3,25 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisConfigurationImpl;
 import org.apache.axis2.modules.Module;
-import org.apache.axis2.phaseresolver.PhaseException;
 import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportSender;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 
 public class ConfigurationContextFactory {
 
-    private Log log = LogFactory.getLog(getClass());
-
     /**
      * Builds the configuration for the Server.
+     *
      * @param repositoryName
      * @return Returns the built ConfigurationContext.
      * @throws DeploymentException
@@ -41,16 +29,14 @@
     public ConfigurationContext buildConfigurationContext(
             String repositoryName)
             throws DeploymentException {
-        ConfigurationContext configurationContext = null;
+        ConfigurationContext configurationContext;
         try {
             DeploymentEngine deploymentEngine =
                     new DeploymentEngine(repositoryName);
             AxisConfiguration configuration = deploymentEngine.load();
             PhaseResolver phaseResolver = new PhaseResolver(configuration);
 
-            if(configurationContext == null){
-                configurationContext = new ConfigurationContext(configuration);
-            }
+            configurationContext = new ConfigurationContext(configuration);
             phaseResolver.buildTranspotsChains();
             initModules(configurationContext);
             initTransports(configurationContext);
@@ -62,6 +48,7 @@
 
     /**
      * Builds the configuration for the client.
+     *
      * @param axis2home the value can be null and resolves to the default axis2.xml file
      * @return Returns ConfigurationContext.
      * @throws DeploymentException
@@ -69,23 +56,19 @@
     public ConfigurationContext buildClientConfigurationContext(
             String axis2home)
             throws DeploymentException {
-        ConfigurationContext engineContext = null;
+        ConfigurationContext configContext;
         try {
             AxisConfiguration configuration =
                     new DeploymentEngine().loadClient(axis2home);
             PhaseResolver phaseResolver = new PhaseResolver(configuration);
-
-            if(engineContext == null){
-                engineContext = new ConfigurationContext(configuration);
-            }
-
+            configContext = new ConfigurationContext(configuration);
             phaseResolver.buildTranspotsChains();
-            initModules(engineContext);
-            initTransports(engineContext);
+            initModules(configContext);
+            initTransports(configContext);
         } catch (AxisFault axisFault) {
             throw new DeploymentException(axisFault);
         }
-        return engineContext;
+        return configContext;
     }
 
     /**
@@ -117,36 +100,8 @@
     }
 
     /**
-     * Resolves the phases and establishes the order of handlers.
-     * @param service
-     * @param configurationContextVal
-     * @param modules
-     * @throws PhaseException
-     */
-    public static void createChains(AxisService service,
-                                    AxisConfiguration configurationContextVal,
-                                    ArrayList modules)
-            throws PhaseException {
-        try {
-            PhaseResolver resolve =
-                    new PhaseResolver(configurationContextVal, service);
-            resolve.buildchains();
-            for (int i = 0; i < modules.size(); i++) {
-                QName qName = (QName) modules.get(i);
-                ModuleDescription moduledesc =
-                        configurationContextVal.getModule(qName);
-                resolve.engageModuleToService(service, moduledesc);
-            }
-        } catch (PhaseException e) {
-            throw e;
-        } catch (AxisFault axisFault) {
-            throw new PhaseException(axisFault);
-        }
-    }
-
-    /**
-     * Initializes TransportSenders and TransportListeners with appropriate configuration information 
-     * 
+     * Initializes TransportSenders and TransportListeners with appropriate configuration information
+     *
      * @param configContext
      * @throws AxisFault
      */

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java Sat Nov 26 05:09:20 2005
@@ -61,7 +61,7 @@
             //processing Paramters
             //Processing service level paramters
             Iterator itr = config_element.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             processParameters(itr, axisConfiguration, axisConfiguration);
 
             //process MessageReciver
@@ -225,7 +225,7 @@
                     //processing Paramters
                     //Processing service level paramters
                     Iterator itr = transport.getChildrenWithName(
-                            new QName(PARAMETERST));
+                            new QName(PARAMETER));
                     processParameters(itr, transportout, axisConfiguration);
 
                     //process INFLOW
@@ -311,7 +311,7 @@
                     //processing Paramters
                     //Processing service level paramters
                     Iterator itr = transport.getChildrenWithName(
-                            new QName(PARAMETERST));
+                            new QName(PARAMETER));
                     processParameters(itr, transportIN, axisConfiguration);
 
                     //process INFLOW
@@ -394,7 +394,7 @@
                 //processing Paramters
                 //Processing service level paramters
                 Iterator itr = observerelement.getChildrenWithName(
-                        new QName(PARAMETERST));
+                        new QName(PARAMETER));
                 processParameters(itr, observer, axisConfiguration);
 
                 // initilization
@@ -440,7 +440,7 @@
                 String module = moduleName_att.getAttributeValue();
                 ModuleConfiguration moduleConfiguration =
                         new ModuleConfiguration(new QName(module), parent);
-                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETERST));
+                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETER));
                 processParameters(paramters, moduleConfiguration, parent);
                 ((AxisConfigurationImpl) config).addModuleConfig(moduleConfiguration);
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java Sat Nov 26 05:09:20 2005
@@ -28,7 +28,7 @@
     public static final String SERVICE_WSDL_NAME = "service.wsdl";
     String SERVICE_WSDL_WITH_FOLDER = "META-INF/service.wsdl";
     String MODULEXML = "META-INF/module.xml";
-    String PARAMETERST = "parameter";// paramater start tag
+    String PARAMETER = "parameter";// paramater start tag
     String LISTENERST = "listener";// paramater start tag
     String HANDERST = "handler";
     String MODULEST = "module";

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Sat Nov 26 05:09:20 2005
@@ -376,7 +376,7 @@
     }
 
 
-    private void addServiceGroup(AxisServiceGroup axisServiceMetaData, ArrayList service) throws AxisFault {
+    private void addServiceGroup(AxisServiceGroup serviceGroup, ArrayList service) throws AxisFault {
 //        Iterator services = currentArchiveFile.getService().values().iterator();
         Iterator services = service.iterator();//              currentArchiveFile.getDeploybleServices().iterator();
         while (services.hasNext()) {
@@ -386,7 +386,7 @@
             axisService.setFileName(currentArchiveFile.getFile().getAbsolutePath());
 
             //module form serviceGroup
-            ArrayList groupModules = axisServiceMetaData.getModules();
+            ArrayList groupModules = serviceGroup.getModules();
             for (int i = 0; i < groupModules.size(); i++) {
                 ModuleDescription module = axisConfig.getModule((QName) groupModules.get(i));
                 if (module != null) {
@@ -420,7 +420,7 @@
                     QName moduleName = (QName) modules.get(i);
                     ModuleDescription module = axisConfig.getModule(moduleName);
                     if (module != null) {
-                        opDesc.engageModule(module);
+                        opDesc.engageModule(module,axisConfig);
                     } else {
                         throw new DeploymentException(Messages.getMessage(
                                 DeploymentErrorMsgs.IN_VALID_MODUELE_REF_BY_OP, opDesc.getName()
@@ -429,9 +429,9 @@
                 }
 
             }
-            axisServiceMetaData.addService(axisService);
+            serviceGroup.addService(axisService);
         }
-        axisConfig.addServiceGroup(axisServiceMetaData);
+        axisConfig.addServiceGroup(serviceGroup);
     }
 
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java Sat Nov 26 05:09:20 2005
@@ -170,7 +170,7 @@
 
             }
             Iterator parameters = handler_element.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             processParameters(parameters,handler,parent);
         }
         handler.setParent(parent);
@@ -211,7 +211,7 @@
             OMElement paraValue = parameterElement.getFirstElement();
             if(paraValue !=null){
                 parameter.setValue(parameterElement);
-                parameter.setParameterType(Parameter.DOM_PARAMETER);
+                parameter.setParameterType(Parameter.OM_PARAMETER);
             } else {
                 String paratextValue = parameterElement.getText();
                 parameter.setValue(paratextValue);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java Sat Nov 26 05:09:20 2005
@@ -76,7 +76,7 @@
             //processing Paramters
             //Processing service level paramters
             Iterator itr = moduleElement.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             processParameters(itr,module,module.getParent());
 
             //process INFLOW
@@ -176,7 +176,7 @@
 
             //Opeartion Paramters
             Iterator paramters = operation.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             ArrayList wsamapping =   processParameters(paramters,op_descrip,module);
             op_descrip.setWsamappingList(wsamapping);
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Sat Nov 26 05:09:20 2005
@@ -74,7 +74,7 @@
 
             //Processing service level paramters
             Iterator itr = service_element.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             processParameters(itr, service, service.getParent());
 
             //process service description
@@ -203,7 +203,7 @@
 
             //Opeartion Paramters
             Iterator paramters = operation.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             ArrayList wsamappings = processParameters(paramters, op_descrip, service);
             op_descrip.setWsamappingList(wsamappings);
             // loading the message receivers
@@ -254,7 +254,7 @@
                 String module = moduleName_att.getAttributeValue();
                 ModuleConfiguration moduleConfiguration =
                         new ModuleConfiguration(new QName(module), parent);
-                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETERST));
+                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETER));
                 processParameters(paramters, moduleConfiguration, parent);
                 service.addModuleConfig(moduleConfiguration);
             }
@@ -275,7 +275,7 @@
                 String module = moduleName_att.getAttributeValue();
                 ModuleConfiguration moduleConfiguration =
                         new ModuleConfiguration(new QName(module), parent);
-                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETERST));
+                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETER));
                 processParameters(paramters, moduleConfiguration, parent);
                 opeartion.addModuleConfig(moduleConfiguration);
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java Sat Nov 26 05:09:20 2005
@@ -50,7 +50,7 @@
         try {
             //Processing service level paramters
             Iterator itr = servcice.getChildrenWithName(
-                    new QName(PARAMETERST));
+                    new QName(PARAMETER));
             processParameters(itr, axisServiceGroup, axisServiceGroup.getParent());
 
             Iterator moduleConfigs = servcice.getChildrenWithName(new QName(MODULECONFIG));
@@ -105,7 +105,7 @@
                 String module = moduleName_att.getAttributeValue();
                 ModuleConfiguration moduleConfiguration =
                         new ModuleConfiguration(new QName(module), parent);
-                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETERST));
+                Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETER));
                 processParameters(paramters, moduleConfiguration, parent);
                 axisService.addModuleConfig(moduleConfiguration);
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Sat Nov 26 05:09:20 2005
@@ -1,16 +1,15 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.engine.AxisError;
-import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.engine.Phase;
-import org.apache.axis2.engine.SOAPProcessingModelChecker;
+import org.apache.axis2.engine.*;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
+import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.wsdl.MessageReference;
 import org.apache.wsdl.WSDLConstants;
 import org.apache.wsdl.WSDLExtensibilityAttribute;
@@ -48,8 +47,8 @@
 */
 
 public abstract class AxisOperation  implements
-        ParameterInclude, WSDLOperation, DescriptionConstants,
-        WSDLConstants {
+        ParameterInclude, DescriptionConstants,
+        WSDLConstants ,WSDLOperation{
 
     private MessageReceiver messageReceiver;
     private ArrayList remainingPhasesInFlow;
@@ -110,7 +109,8 @@
      * @param moduleref
      * @throws org.apache.axis2.AxisFault
      */
-    public final void engageModule(ModuleDescription moduleref) throws AxisFault {
+    public final void engageModule(ModuleDescription moduleref,
+                                   AxisConfiguration axisConfig) throws AxisFault {
         if (moduleref == null) {
             return;
         }
@@ -126,7 +126,7 @@
             }
 
         }
-        //    new PhaseResolver().engageModuleToOperation(this, moduleref);
+        new PhaseResolver(axisConfig).engageModuleToOperation(this, moduleref);
         collectionModule.add(moduleref);
     }
 
@@ -198,6 +198,12 @@
         return messageReceiver;
     }
 
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
+                .getComponentProperty(PARAMETER_KEY);
+        paramInclude.deserializeParameters(parameterElement);
+    }
+
     public void setMessageReceiver(MessageReceiver messageReceiver) {
         this.messageReceiver = messageReceiver;
     }
@@ -485,7 +491,7 @@
     }
 
     public void setMetadataBag(Map meMap){
-         wsdlopeartion.setMetadataBag(meMap);
+        wsdlopeartion.setMetadataBag(meMap);
     }
 
 
@@ -516,7 +522,7 @@
         if (null == msgContext.getRelatesTo()) {
             //Its a new incomming message so get the factory to create a new
             // one
-           operationContext =  new OperationContext(this,serviceContext);
+            operationContext =  new OperationContext(this,serviceContext);
         } else {
             // So this message is part of an ongoing MEP
             //			operationContext =
@@ -544,10 +550,9 @@
      * @throws AxisFault
      */
     public OperationContext findForExistingOperationContext(MessageContext msgContext) throws AxisFault {
-        OperationContext operationContext = null;
-
+        OperationContext operationContext ;
         if((operationContext = msgContext.getOperationContext()) != null) {
-        	return operationContext;
+            return operationContext;
         }
 
         if (null == msgContext.getRelatesTo()) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Sat Nov 26 05:09:20 2005
@@ -22,18 +22,15 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.phaseresolver.PhaseResolver;
-import org.apache.wsdl.WSDLBindingOperation;
-import org.apache.wsdl.WSDLEndpoint;
-import org.apache.wsdl.WSDLExtensibilityAttribute;
-import org.apache.wsdl.WSDLExtensibilityElement;
-import org.apache.wsdl.WSDLInterface;
-import org.apache.wsdl.WSDLOperation;
-import org.apache.wsdl.WSDLService;
+import org.apache.wsdl.*;
 import org.apache.wsdl.extensions.ExtensionConstants;
 import org.apache.wsdl.extensions.SOAPOperation;
 import org.apache.wsdl.impl.WSDLInterfaceImpl;
 import org.apache.wsdl.impl.WSDLServiceImpl;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Port;
@@ -44,13 +41,7 @@
 import javax.xml.namespace.QName;
 import java.io.IOException;
 import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * Class AxisService
@@ -64,6 +55,8 @@
 
     private Definition definition = null;
 
+    private Log log = LogFactory.getLog(getClass());
+
     private HashMap moduleConfigmap;
 
     private AxisServiceGroup parent;
@@ -159,8 +152,7 @@
                                     AxisConfiguration axisConfig) throws AxisFault {
         HashMap map = module.getOperations();
         Collection col = map.values();
-        PhaseResolver pr = new PhaseResolver(axisConfig, this);
-
+//        PhaseResolver pr = new PhaseResolver(axisConfig, this);
         for (Iterator iterator = col.iterator(); iterator.hasNext();) {
             AxisOperation axisOperation = (AxisOperation) iterator.next();
             ArrayList wsamappings = axisOperation.getWsamappingList();
@@ -168,7 +160,7 @@
                 Parameter paramter = (Parameter) wsamappings.get(j);
                 this.addMapping((String) paramter.getValue(), axisOperation);
             }
-            pr.buildModuleOperation(axisOperation);
+//            pr.buildModuleOperation(axisOperation);
             this.addOperation(axisOperation);
         }
     }
@@ -241,20 +233,22 @@
      *
      * @param axisOperation
      */
-    public void addOperation(AxisOperation axisOperation) throws AxisFault {
+    public void addOperation(AxisOperation axisOperation) {
         axisOperation.setParent(this);
         //todo phase resolving and module engagement :
-//        Iterator modules = getEngagedModules().iterator();
-//        while (modules.hasNext()) {
-//            ModuleDescription module = (ModuleDescription) modules.next();
-//            axisOperation.engageModule(module);
-//        }
-        AxisServiceGroup parent = getParent();
-        if (parent != null) {
-            AxisConfiguration axisConfig = parent.getParent();
-            if (axisConfig != null) {
-                PhaseResolver pr = new PhaseResolver(axisConfig,this);
-                pr.buildModuleOperation(axisOperation);
+        Iterator modules = getEngagedModules().iterator();
+        while (modules.hasNext()) {
+            ModuleDescription module = (ModuleDescription) modules.next();
+            AxisServiceGroup parent = getParent();
+            AxisConfiguration axisConfig = null;
+            if (parent != null) {
+                axisConfig = parent.getParent();
+            }
+            try {
+                axisOperation.engageModule(module, axisConfig);
+            } catch (AxisFault axisFault) {
+                log.info("Trying to engage a module which is already engege:"
+                        + module.getName().getLocalPart());
             }
         }
         this.getServiceInterface().setOperation(axisOperation);
@@ -618,8 +612,7 @@
      */
     public ServiceContext u(MessageContext msgContext) {
         // TODO : Fix me. Can't look up a service context in the system context
-
-        ServiceContext serviceContext = null;
+        ServiceContext serviceContext;
         if (null == msgContext.getServiceGroupContextId()) {
             serviceContext =
                     new ServiceContext(this, msgContext.getServiceGroupContext());
@@ -830,6 +823,12 @@
             Parameter parameter = getParameter(paramterName);
             return parameter != null && parameter.isLocked();
         }
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        ParameterIncludeImpl paramInclude =
+                (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
+        paramInclude.deserializeParameters(parameterElement);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java Sat Nov 26 05:09:20 2005
@@ -21,23 +21,27 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisEvent;
-import org.apache.axis2.phaseresolver.PhaseResolver;
+import org.apache.axis2.om.OMElement;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 
-public class AxisServiceGroup implements ParameterInclude{
+public class AxisServiceGroup implements ParameterInclude {
 
     //to add and get paramters
     protected ParameterInclude paramInclude;
 
+    private Log log = LogFactory.getLog(getClass());
+
     // to keep name of the service group
     private String serviceGroupName;
 
     // to keep the parent of service group , to chcek paramter lock checking and serching
-    private  AxisConfiguration parent;
+    private AxisConfiguration parent;
 
     /**
      * Field services
@@ -84,21 +88,21 @@
         // checking the locked value of parent
         boolean loscked = false;
 
-        if (getParent() !=null) {
-            loscked =  getParent().isParameterLocked(paramterName);
+        if (getParent() != null) {
+            loscked = getParent().isParameterLocked(paramterName);
         }
-        if(loscked){
+        if (loscked) {
             return true;
         } else {
             Parameter parameter = getParameter(paramterName);
-            if(parameter != null && parameter.isLocked()){
-                return true;
-            } else {
-                return false;
-            }
+            return parameter != null && parameter.isLocked();
         }
     }
 
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.paramInclude.deserializeParameters(parameterElement);
+    }
+
     public String getServiceGroupName() {
         return serviceGroupName;
     }
@@ -117,20 +121,21 @@
 
     /**
      * Adding module configuration , if there is moduleConfig tag in service
+     *
      * @param moduleConfiguration
      */
-    public void addModuleConfig(ModuleConfiguration moduleConfiguration){
-        if(moduleConfigmap == null){
+    public void addModuleConfig(ModuleConfiguration moduleConfiguration) {
+        if (moduleConfigmap == null) {
             moduleConfigmap = new HashMap();
         }
-        moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
+        moduleConfigmap.put(moduleConfiguration.getModuleName(), moduleConfiguration);
     }
 
-    public ModuleConfiguration getModuleConfig(QName moduleName){
-        return  (ModuleConfiguration)moduleConfigmap.get(moduleName);
+    public ModuleConfiguration getModuleConfig(QName moduleName) {
+        return (ModuleConfiguration) moduleConfigmap.get(moduleName);
     }
 
-    public void addModule(QName moduleName){
+    public void addModule(QName moduleName) {
         modules.add(moduleName);
     }
 
@@ -148,32 +153,51 @@
             }
         }
         Iterator srevice = getServices();
-        PhaseResolver phaseResolver = new PhaseResolver(this.getParent());
+//        PhaseResolver phaseResolver = new PhaseResolver(this.getParent());
         ModuleDescription module = this.parent.getModule(moduleName);
-        if (module !=null) {
+        if (module != null) {
             while (srevice.hasNext()) {
                 // engagin per each service
                 AxisService axisService = (AxisService) srevice.next();
-                phaseResolver.engageModuleToService(axisService, module);
+                try {
+                    axisService.engageModule(module, this.getParent());
+                } catch (AxisFault axisFault) {
+                    log.info(axisFault.getMessage());
+                }
+//                phaseResolver.engageModuleToService(axisService, module);
             }
         }
         addModule(moduleName);
     }
 
-    public ArrayList getServiceGroupModules(){
+    public ArrayList getServiceGroupModules() {
         return modules;
     }
 
 
-    public Iterator getServices(){
+    public Iterator getServices() {
         return services.values().iterator();
     }
 
     public synchronized void addService(AxisService service) throws AxisFault {
         services.put(service.getName(), service);
         service.setParent(this);
-        PhaseResolver handlerResolver = new PhaseResolver(this.parent, service);
-        handlerResolver.buildchains();
+        AxisConfiguration axisConfig = getParent();
+        if (axisConfig != null) {
+            Iterator modules = getModules().iterator();
+            while (modules.hasNext()) {
+                QName moduleName = (QName) modules.next();
+                ModuleDescription moduleDesc = axisConfig.getModule(moduleName);
+                if (moduleDesc != null) {
+                    service.engageModule(moduleDesc, axisConfig);
+                } else {
+                    throw new AxisFault("Trying to engage a module which is not " +
+                            "available : " + moduleName.getLocalPart());
+                }
+            }
+        }
+//        PhaseResolver handlerResolver = new PhaseResolver(this.parent, service);
+//        handlerResolver.buildchains();
         service.setLastupdate();
     }
 
@@ -189,11 +213,11 @@
         return (AxisService) services.get(name);
     }
 
-    public void addModuleref(QName moduleref){
+    public void addModuleref(QName moduleref) {
         mdoulesList.add(moduleref);
     }
 
-    public ArrayList getModules(){
+    public ArrayList getModules() {
         return mdoulesList;
     }
 
@@ -201,14 +225,13 @@
     public synchronized void removeService(QName name) throws AxisFault {
         AxisService service = getService(name);
         if (service != null) {
-            this.parent.notifyObservers(AxisEvent.SERVICE_DEPLOY , service);
+            this.parent.notifyObservers(AxisEvent.SERVICE_DEPLOY, service);
         }
         services.remove(name);
     }
 
-    public ServiceGroupContext getServiceGroupContext(ConfigurationContext parent){
-        ServiceGroupContext serviceGroupContext = new ServiceGroupContext(parent,this) ;
-        return serviceGroupContext;
+    public ServiceGroupContext getServiceGroupContext(ConfigurationContext parent) {
+        return new ServiceGroupContext(parent, this);
     }
 
     public ClassLoader getServiceGroupClassLoader() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.engine.Handler;
 
 import javax.xml.namespace.QName;
@@ -134,6 +135,10 @@
             }
         }
         return parameterInclude.isParameterLocked(paramterName);
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.parameterInclude.deserializeParameters(parameterElement);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
@@ -76,6 +77,10 @@
             Parameter parameter = getParameter(paramterName);
             return parameter != null && parameter.isLocked();
         }
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.paramterinclude.deserializeParameters(parameterElement);
     }
 
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.modules.Module;
 
@@ -212,6 +213,10 @@
                 return false;
             }
         }
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.parameters.deserializeParameters(parameterElement);
     }
 
     public ClassLoader getModuleClassLoader() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java Sat Nov 26 05:09:20 2005
@@ -28,9 +28,9 @@
     public static int TEXT_PARAMETER = 0;
 
     /**
-     * Field DOM_PARAMETER
+     * Field OM_PARAMETER
      */
-    public static int DOM_PARAMETER = 1;
+    public static int OM_PARAMETER = 1;
 
     /**
      * Method getName

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 
 import java.util.ArrayList;
 
@@ -53,5 +54,8 @@
      */
 
     boolean isParameterLocked(String paramterName);
+
+     public void  deserializeParameters(OMElement parameterElement) throws AxisFault;
+
 
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java Sat Nov 26 05:09:20 2005
@@ -16,6 +16,12 @@
 
 package org.apache.axis2.description;
 
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMAttribute;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.deployment.DeploymentConstants;
+
+import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -71,5 +77,51 @@
     //to check whether the paramter is locked at any levle
     public boolean isParameterLocked(String paramterName) {
         return false;
+    }
+
+    /**
+     * At the run time it can be able to change paramters , and system can save at any time and
+     * to get the original state this method can be used
+     * @param paramters <code>OMElement</code>
+     * @throws org.apache.axis2.AxisFault
+     */
+    public void  deserializeParameters(OMElement paramters) throws AxisFault {
+        Iterator parameters = paramters.getChildrenWithName(new QName(DeploymentConstants.PARAMETER));
+        while (parameters.hasNext()) {
+            //this is to check whether some one has locked the parmter at the top level
+            OMElement parameterElement = (OMElement) parameters.next();
+
+            Parameter parameter = new ParameterImpl();
+            //setting parameterElement
+            parameter.setParameterElement(parameterElement);
+
+            //setting parameter Name
+            OMAttribute paraName = parameterElement.getAttribute(
+                    new QName(DeploymentConstants.ATTNAME));
+            parameter.setName(paraName.getAttributeValue());
+
+            //setting paramter Value (the chiled elemnt of the paramter)
+            OMElement paraValue = parameterElement.getFirstElement();
+            if(paraValue !=null){
+                parameter.setValue(parameterElement);
+                parameter.setParameterType(Parameter.OM_PARAMETER);
+            } else {
+                String paratextValue = parameterElement.getText();
+                parameter.setValue(paratextValue);
+                parameter.setParameterType(Parameter.TEXT_PARAMETER);
+            }
+            //setting locking attribute
+            OMAttribute paraLocked = parameterElement.getAttribute(
+                    new QName(DeploymentConstants.ATTLOCKED));
+            if (paraLocked !=null) {
+                String lockedValue = paraLocked.getAttributeValue();
+                if("true".equals(lockedValue)){
+                    parameter.setLocked(true);
+                } else {
+                    parameter.setLocked(false);
+                }
+            }
+            addParameter(parameter);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.engine.Phase;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
 import org.apache.axis2.transport.TransportListener;
@@ -91,6 +92,10 @@
     //to check whether the paramter is locked at any levle
     public boolean isParameterLocked(String paramterName) {
         return paramInclude.isParameterLocked(paramterName);
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.paramInclude.deserializeParameters(parameterElement);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java Sat Nov 26 05:09:20 2005
@@ -17,6 +17,7 @@
 package org.apache.axis2.description;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.engine.Phase;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
 import org.apache.axis2.transport.TransportSender;
@@ -85,6 +86,10 @@
     //to check whether the paramter is locked at any levle
     public boolean isParameterLocked(String paramterName) {
         return paramInclude.isParameterLocked(paramterName);
+    }
+
+    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
+        this.paramInclude.deserializeParameters(parameterElement);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AbstractDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AbstractDispatcher.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AbstractDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AbstractDispatcher.java Sat Nov 26 05:09:20 2005
@@ -17,11 +17,7 @@
 package org.apache.axis2.engine;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.context.*;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.HandlerDescription;

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AddressingBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AddressingBasedDispatcher.java Sat Nov 26 05:09:20 2005
@@ -44,7 +44,7 @@
 
     //TODO this logic needed to be improved, as the Dispatching is almost garentnee to fail
     public AxisOperation findOperation(AxisService service,
-                                              MessageContext messageContext)
+                                       MessageContext messageContext)
             throws AxisFault {
         String action = messageContext.getWSAAction();
         if (action != null) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Sat Nov 26 05:09:20 2005
@@ -24,7 +24,6 @@
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.util.HostConfiguration;
-
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -73,7 +72,7 @@
     public void addService(AxisService service) throws AxisFault;
 
     //to Add service Groups
-     public void addServiceGroup(AxisServiceGroup axisServiceGroup) throws AxisFault;
+    public void addServiceGroup(AxisServiceGroup axisServiceGroup) throws AxisFault;
 
     /**
      * Method removeService
@@ -87,7 +86,6 @@
      * Modules is read only as they can not deployed while runing
      *
      * @param name
-     * @return
      */
     public ModuleDescription getModule(QName name);
 
@@ -110,9 +108,9 @@
     public void engageModule(QName moduleref) throws AxisFault;
 
 
-
     //
     public HashMap getServices();
+
     /**
      * This returns
      */
@@ -143,22 +141,26 @@
 
     Iterator getServiceGroups();
 
-    public void notifyObservers(int event_type , AxisService service);
+    public void notifyObservers(int event_type, AxisService service);
 
 
     //the class loder which become the top most parent of all the modules and services
     public ClassLoader getSystemClassLoader();
+
     public void setSystemClassLoader(ClassLoader classLoader);
 
     // the class loder that become the paranet of all the services
     public ClassLoader getServiceClassLoader();
+
     public void setServiceClassLoader(ClassLoader classLoader);
 
     // the class loder that become the paranet of all the moduels
     public ClassLoader getModuleClassLoader();
+
     public void setModuleClassLoader(ClassLoader classLoader);
 
     //to set and get host configuration
     void setHostConfiguration(HostConfiguration hostConfiguration);
+
     HostConfiguration getHostConfiguration();
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Sat Nov 26 05:09:20 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.description.*;
+import org.apache.axis2.om.OMElement;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
 import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.util.HostConfiguration;
@@ -29,12 +30,7 @@
 
 import javax.xml.namespace.QName;
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * Class EngineRegistryImpl
@@ -73,8 +69,6 @@
 
     private ArrayList inPhasesUptoAndIncludingPostDispatch;
 
-
-
     /////////////////////// From AxisGlobal /////////////////////////////////////
     /**
      * Field paramInclude
@@ -102,10 +96,9 @@
     private ClassLoader moduleClassLoader;
 
 
-
-
     protected HashMap messagReceivers;
     /////////////////////// From AxisGlobal /////////////////////////////////////
+
     /**
      * Constructor EngineRegistryImpl
      */
@@ -136,7 +129,7 @@
     /**
      * setting the default dispatching order
      */
-    public void setDefaultDispatchers(){
+    public void setDefaultDispatchers() {
 
         Phase dispatch = new Phase(PhaseMetadata.PHASE_DISPATCH);
         AddressingBasedDispatcher add_dispatch = new AddressingBasedDispatcher();
@@ -170,17 +163,18 @@
         InstanceDispatcher instanceDispatcher = new org.apache.axis2.engine.InstanceDispatcher();
         instanceDispatcher.getHandlerDesc().setParent(this);
 
-        postDispatch.addHandler(dispatchingChecker,0);
-        postDispatch.addHandler(instanceDispatcher,1);
+        postDispatch.addHandler(dispatchingChecker, 0);
+        postDispatch.addHandler(instanceDispatcher, 1);
         inPhasesUptoAndIncludingPostDispatch.add(postDispatch);
     }
 
 
     /**
      * Setting the custom dispatching order
+     *
      * @param dispatch
      */
-    public void setDispatchPhase(Phase dispatch){
+    public void setDispatchPhase(Phase dispatch) {
         inPhasesUptoAndIncludingPostDispatch.add(dispatch);
 
         Phase postDispatch = new Phase(PhaseMetadata.PHASE_POST_DISPATCH);
@@ -191,7 +185,7 @@
         instanceDispatcher.getHandlerDesc().setParent(this);
 
         postDispatch.addHandler(dispatchingChecker);
-        postDispatch.addHandler(instanceDispatcher,1);
+        postDispatch.addHandler(instanceDispatcher, 1);
         inPhasesUptoAndIncludingPostDispatch.add(postDispatch);
     }
 
@@ -231,10 +225,10 @@
 
     public void addServiceGroup(AxisServiceGroup axisServiceGroup) throws AxisFault {
         Iterator services = axisServiceGroup.getServices();
-        AxisService description ;
+        AxisService description;
         while (services.hasNext()) {
             description = (AxisService) services.next();
-            if(allservices.get(description.getName().getLocalPart()) !=null){
+            if (allservices.get(description.getName().getLocalPart()) != null) {
                 throw new AxisFault("Two services can not have same name, a service with " +
                         description.getName().getLocalPart() + " alredy exist in the system");
             }
@@ -242,15 +236,15 @@
         services = axisServiceGroup.getServices();
         while (services.hasNext()) {
             description = (AxisService) services.next();
-            allservices.put(description.getName().getLocalPart(),description);
-            notifyObservers(AxisEvent.SERVICE_DEPLOY ,description);
+            allservices.put(description.getName().getLocalPart(), description);
+            notifyObservers(AxisEvent.SERVICE_DEPLOY, description);
         }
         Iterator enModule = engagedModules.iterator();
         while (enModule.hasNext()) {
             QName moduleDescription = (QName) enModule.next();
-            axisServiceGroup.addModule(moduleDescription);
+            axisServiceGroup.engageModuleToGroup(moduleDescription);
         }
-        serviceGroups.put(axisServiceGroup.getServiceGroupName(),axisServiceGroup);
+        serviceGroups.put(axisServiceGroup.getServiceGroupName(), axisServiceGroup);
     }
 
     /**
@@ -269,6 +263,7 @@
     public HashMap getModules() {
         return modules;
     }
+
     /**
      * Method getService
      *
@@ -277,7 +272,7 @@
      * @throws AxisFault
      */
     public AxisService getService(String name) throws AxisFault {
-        return  (AxisService)allservices.get(name);
+        return (AxisService) allservices.get(name);
     }
 
     /**
@@ -287,8 +282,8 @@
      * @throws AxisFault
      */
     public synchronized void removeService(String name) throws AxisFault {
-        AxisService service =(AxisService)allservices.remove(name);
-        if(service != null){
+        AxisService service = (AxisService) allservices.remove(name);
+        if (service != null) {
             log.info("Removed service " + name);
         }
     }
@@ -337,8 +332,12 @@
         return parameter != null && parameter.isLocked();
     }
 
+    public void deserializeParameters(OMElement paramters) throws AxisFault {
+        this.paramInclude.deserializeParameters(paramters);
+    }
+
     public AxisServiceGroup getServiceGroup(String serviceNameAndGroupString) {
-        return (AxisServiceGroup)serviceGroups.get(serviceNameAndGroupString);
+        return (AxisServiceGroup) serviceGroups.get(serviceNameAndGroupString);
     }
 
     public Iterator getServiceGroups() {
@@ -417,10 +416,10 @@
      *
      * @param param
      */
-    public void addParameter(Parameter param) throws AxisFault{
-        if(isParameterLocked(param.getName())){
+    public void addParameter(Parameter param) throws AxisFault {
+        if (isParameterLocked(param.getName())) {
             throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else{
+        } else {
             paramInclude.addParameter(param);
         }
     }
@@ -428,7 +427,7 @@
     /**
      * Method getEngadgedModules
      *
-     * @return  Collection
+     * @return Collection
      */
     public Collection getEngadgedModules() {
         return engagedModules;
@@ -441,7 +440,7 @@
         if (module == null) {
             File file = new ArchiveReader().creatModuleArchivefromResource(
                     moduleref.getLocalPart(), getRepository());
-            module = new DeploymentEngine().buildModule(file,this);
+            module = new DeploymentEngine().buildModule(file, this);
             isNewmodule = true;
         }
         if (module != null) {
@@ -451,7 +450,7 @@
                 if (moduleref.equals(qName)) {
                     tobeEngaged = false;
                     //Instead of throwing the error, we can just log this problem
-                    log.info("Attempt to engage an already engaged module "+ qName);
+                    log.info("Attempt to engage an already engaged module " + qName);
                 }
             }
         } else {
@@ -461,6 +460,7 @@
                             " has not bean deployed yet !");
         }
         if (tobeEngaged) {
+            Iterator sgs = getServiceGroups();
             new PhaseResolver(this).engageModuleGlobally(module);
             engagedModules.add(moduleref);
         }
@@ -474,10 +474,10 @@
         Iterator sgs = getServiceGroups();
         while (sgs.hasNext()) {
             AxisServiceGroup axisServiceGroup = (AxisServiceGroup) sgs.next();
-            Iterator servics =  axisServiceGroup.getServices();
+            Iterator servics = axisServiceGroup.getServices();
             while (servics.hasNext()) {
                 AxisService axisService = (AxisService) servics.next();
-                allservices.put(axisService.getName().getLocalPart(),axisService);
+                allservices.put(axisService.getName().getLocalPart(), axisService);
             }
         }
         return allservices;
@@ -503,8 +503,8 @@
         this.axis2Repository = axis2Repository;
     }
 
-    public void notifyObservers(int event_type , AxisService service){
-        AxisEvent event = new AxisEvent(service,event_type);
+    public void notifyObservers(int event_type, AxisService service) {
+        AxisEvent event = new AxisEvent(service, event_type);
         for (int i = 0; i < observersList.size(); i++) {
             AxisObserver axisObserver = (AxisObserver) observersList.get(i);
             axisObserver.update(event);
@@ -547,20 +547,21 @@
         return this.hostConfiguration;
     }
 
-    public void addObservers(AxisObserver axisObserver){
+    public void addObservers(AxisObserver axisObserver) {
         observersList.add(axisObserver);
     }
 
 
     /**
      * Adding module configuration , if there is moduleConfig tag in service
+     *
      * @param moduleConfiguration
      */
-    public void addModuleConfig(ModuleConfiguration moduleConfiguration){
-        moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
+    public void addModuleConfig(ModuleConfiguration moduleConfiguration) {
+        moduleConfigmap.put(moduleConfiguration.getModuleName(), moduleConfiguration);
     }
 
-    public ModuleConfiguration getModuleConfig(QName moduleName){
-        return  (ModuleConfiguration)moduleConfigmap.get(moduleName);
+    public ModuleConfiguration getModuleConfig(QName moduleName) {
+        return (ModuleConfiguration) moduleConfigmap.get(moduleName);
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Sat Nov 26 05:09:20 2005
@@ -25,24 +25,13 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.soap.SOAP11Constants;
-import org.apache.axis2.soap.SOAP12Constants;
-import org.apache.axis2.soap.SOAPEnvelope;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultCode;
-import org.apache.axis2.soap.SOAPFaultDetail;
-import org.apache.axis2.soap.SOAPFaultReason;
-import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.*;
 import org.apache.axis2.transport.TransportSender;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
+import java.io.*;
 import java.util.ArrayList;
 
 /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java Sat Nov 26 05:09:20 2005
@@ -29,7 +29,7 @@
     public static final int SERVICE_DEPLOY = 1;
     public static final int SERVICE_REMOVE = 0;
 
-    private AxisService service ;
+    private AxisService service;
 
     private int EVENT_TYPE;
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisObserver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisObserver.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisObserver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisObserver.java Sat Nov 26 05:09:20 2005
@@ -21,6 +21,7 @@
 public interface AxisObserver extends ParameterInclude {
     //The initilization code will go here
     void init();
+
     void update(AxisEvent event);
 
     //there can be parameters for the Observers

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java Sat Nov 26 05:09:20 2005
@@ -53,14 +53,14 @@
      * @throws AxisFault
      */
     public final void invoke(MessageContext msgctx) throws AxisFault {
-        if(msgctx.getAxisOperation() == null && msgctx.getOperationContext() != null ){
+        if (msgctx.getAxisOperation() == null && msgctx.getOperationContext() != null) {
             msgctx.setAxisOperation(msgctx.getOperationContext().getAxisOperation());
         }
 
-        if(msgctx.getAxisService() == null && msgctx.getServiceContext() != null){
+        if (msgctx.getAxisService() == null && msgctx.getServiceContext() != null) {
             msgctx.setAxisService(msgctx.getServiceContext().getAxisService());
         }
-        
+
         EndpointReference toEPR = msgctx.getTo();
         if (msgctx.getAxisService() == null) {
             throw new AxisFault(

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java Sat Nov 26 05:09:20 2005
@@ -21,7 +21,7 @@
 
 /**
  * This one receives the Message, what is does is not of concern for Axis2 (litirally).
- * Any incomming message is hand over to the MessageReceiver, if the processing produce something 
+ * Any incomming message is hand over to the MessageReceiver, if the processing produce something
  * or not as well as is there areany more SOAP Message to be sent or recived is up to the
  * Message Receiver to decide.
  */

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java Sat Nov 26 05:09:20 2005
@@ -25,6 +25,7 @@
 
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
+import java.util.Iterator;
 
 /**
  * <p>This is Phase, a orderd collection of Handlers.
@@ -112,8 +113,8 @@
     public void addHandler(Handler handler, int index) {
         log.info(
                 "Handler " + handler.getName() + "Added to place " + 1 +
-                " At the Phase " +
-                phaseName);
+                        " At the Phase " +
+                        phaseName);
         handlers.add(index, handler);
     }
 
@@ -125,7 +126,7 @@
     public void addHandler(Handler handler) {
         log.info(
                 "Handler " + handler.getName() + " Added to the Phase " +
-                phaseName);
+                        phaseName);
         handlers.add(handler);
     }
 
@@ -232,11 +233,13 @@
      */
     public void setPhaseFirst(Handler phaseFirst) throws PhaseException {
         if (phasefirstset) {
-            throw new PhaseException("PhaseFirst alredy has been set, cannot have two phaseFirst Handler for same phase "
+            throw new PhaseException("PhaseFirst alredy has been set, cannot have two" +
+                    " phaseFirst Handler for same phase "
                     + this.getPhaseName());
         } else {
             if (getBeforeAfter(phaseFirst) != ANYWHERE) {
-                throw new PhaseException("Handler with PhaseFirst can not have any before or after proprty error in "
+                throw new PhaseException("Handler with PhaseFirst can not have " +
+                        "any before or after proprty error in "
                         + phaseFirst.getName());
             } else {
                 this.phaseFirst = phaseFirst;
@@ -253,11 +256,13 @@
      */
     public void setPhaseLast(Handler phaseLast) throws PhaseException {
         if (phaselastset) {
-            throw new PhaseException("PhaseLast already has been set, cannot have two PhaseLast Handler for same phase "
+            throw new PhaseException("PhaseLast already has been set," +
+                    " cannot have two PhaseLast Handler for same phase "
                     + this.getPhaseName());
         } else {
             if (getBeforeAfter(phaseLast) != ANYWHERE) {
-                throw new PhaseException("Handler with PhaseLast property can not have any before or after property error in "
+                throw new PhaseException("Handler with PhaseLast property " +
+                        "can not have any before or after property error in "
                         + phaseLast.getName());
             } else {
                 this.phaseLast = phaseLast;
@@ -273,34 +278,41 @@
      * @throws PhaseException
      */
     public void addHandler(HandlerDescription handler) throws PhaseException {
+        Iterator handlers_itr = getHandlers().iterator();
+        while (handlers_itr.hasNext()) {
+            Handler hand = (Handler) handlers_itr.next();
+            HandlerDescription handlerDesc = hand.getHandlerDesc();
+            if (handler.equals(handlerDesc)) {
+                //tryting to add the same handler twice to the phase
+                // this is can happen due to we are allowing service specifc module
+                //to add hndlers into gloal chain
+                return;
+            }
+        }
         if (isOneHanlder) {
             throw new PhaseException(
                     this.getPhaseName()
-                    + "can only have one handler, since there is a "
-                    + "handler with both phaseFirst and PhaseLast true ");
+                            + "can only have one handler, since there is a "
+                            + "handler with both phaseFirst and PhaseLast true ");
         } else {
             if (handler.getRules().isPhaseFirst() &&
                     handler.getRules().isPhaseLast()) {
                 if (handlers.size() > 0) {
                     throw new PhaseException(
                             this.getPhaseName()
-                            + " can not have more than one handler "
-                            + handler.getName()
-                            + " is invalid or incorrect phase rules");
+                                    + " can not have more than one handler "
+                                    + handler.getName()
+                                    + " is invalid or incorrect phase rules");
                 } else {
                     handlers.add(handler.getHandler());
                     isOneHanlder = true;
-                    return;
                 }
             } else if (handler.getRules().isPhaseFirst()) {
                 setPhaseFirst(handler.getHandler());
-                return;
             } else if (handler.getRules().isPhaseLast()) {
                 setPhaseLast(handler.getHandler());
-                return;
             } else {
                 insertHandler(handler);
-                return;
             }
         }
     }
@@ -466,12 +478,12 @@
                     .getAfter()
                     .equals(
                             temphandler.getHandlerDesc().getName()
-                    .getLocalPart())) {
+                                    .getLocalPart())) {
                 after = i;
             } else if (
                     handler.getHandlerDesc().getRules().getBefore().equals(
                             temphandler.getHandlerDesc().getName()
-                    .getLocalPart())) {
+                                    .getLocalPart())) {
                 before = i;
             }
             if ((after >= 0) && (before >= 0)) {
@@ -480,7 +492,7 @@
                     //TODO fix me Deepal , (have to check this)
                     throw new PhaseException(
                             "incorrect handler order for " +
-                            handler.getHandlerDesc().getName());
+                                    handler.getHandlerDesc().getName());
                 } else {
                     if (after + 1 <= handlers.size()) {
                         handlers.add(after + 1, handler);
@@ -501,26 +513,22 @@
         validateafter(han);
         validatebefore(han);
         switch (type) {
-            case BOTH_BEFORE_AFTER:
-                {
-                    insertBeforeandAfter(han);
-                    break;
-                }
-            case BEFORE:
-                {
-                    insertBefore(han);
-                    break;
-                }
-            case AFTER:
-                {
-                    insertAfter(han);
-                    break;
-                }
-            case ANYWHERE:
-                {
-                    handlers.add(han);
-                    break;
-                }
+            case BOTH_BEFORE_AFTER: {
+                insertBeforeandAfter(han);
+                break;
+            }
+            case BEFORE: {
+                insertBefore(han);
+                break;
+            }
+            case AFTER: {
+                insertAfter(han);
+                break;
+            }
+            case ANYWHERE: {
+                handlers.add(han);
+                break;
+            }
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java Sat Nov 26 05:09:20 2005
@@ -41,7 +41,7 @@
 
 
     public AxisOperation findOperation(AxisService service,
-                                              MessageContext messageContext)
+                                       MessageContext messageContext)
             throws AxisFault {
         if (operationName != null) {
             return service.getOperation(operationName);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java Sat Nov 26 05:09:20 2005
@@ -25,7 +25,7 @@
 import javax.xml.namespace.QName;
 
 /**
- * Dispatches based on the SOAPAction 
+ * Dispatches based on the SOAPAction
  */
 public class SOAPActionBasedDispatcher extends AbstractDispatcher {
     /**
@@ -35,11 +35,12 @@
             new QName("http://axis.ws.apache.org",
                     "SOAPActionBasedDispatcher");
 
-     public void initDispatcher() {
+    public void initDispatcher() {
         init(new HandlerDescription(NAME));
     }
+
     public AxisOperation findOperation(AxisService service,
-                                              MessageContext messageContext)
+                                       MessageContext messageContext)
             throws AxisFault {
 
         String action = messageContext.getSoapAction();
@@ -49,8 +50,8 @@
                 op = service.getOperation(new QName(action));
             }
             /* HACK: Please remove this when we add support for custom action uri */
-            if (op == null && action.lastIndexOf('/')!=-1) {
-                op = service.getOperation(new QName(action.substring(action.lastIndexOf('/'),action.length())));
+            if (op == null && action.lastIndexOf('/') != -1) {
+                op = service.getOperation(new QName(action.substring(action.lastIndexOf('/'), action.length())));
             }
             return op;
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java Sat Nov 26 05:09:20 2005
@@ -41,19 +41,19 @@
     String serviceName = null;
     QName operationName = null;
 
-     public void initDispatcher() {
+    public void initDispatcher() {
         init(new HandlerDescription(NAME));
     }
 
     public AxisOperation findOperation(AxisService service,
-                                              MessageContext messageContext)
+                                       MessageContext messageContext)
             throws AxisFault {
         OMElement bodyFirstChild = messageContext.getEnvelope().getBody()
                 .getFirstElement();
-        if(bodyFirstChild == null){
+        if (bodyFirstChild == null) {
             return null;
-        }else{
-              operationName = new QName(bodyFirstChild.getLocalName());
+        } else {
+            operationName = new QName(bodyFirstChild.getLocalName());
         }
 
         return service.getOperation(operationName);
@@ -64,8 +64,8 @@
      */
     public AxisService findService(MessageContext messageContext) throws AxisFault {
         OMElement bodyFirstChild = messageContext.getEnvelope().getBody().getFirstElement();
-                
-        if(bodyFirstChild != null){
+
+        if (bodyFirstChild != null) {
             OMNamespace ns = bodyFirstChild.getNamespace();
             if (ns != null) {
                 String filePart = ns.getName();
@@ -82,7 +82,7 @@
                     return registry.getService(serviceName);
                 }
             }
-        }        
+        }
         return null;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java Sat Nov 26 05:09:20 2005
@@ -52,7 +52,7 @@
             // additional roles and then to check that any headers targetted for
             // that role too have been dealt with.
 
-            
+
             String role = hb.getRole();
 
             if (!msgContext.isSOAP11()) {
@@ -61,7 +61,7 @@
                 if (role != null && !SOAP12Constants.SOAP_ROLE_NEXT.equals(role)) {
                     throw new AxisFault("Must Understand check failed", SOAP11Constants.FAULT_CODE_MUST_UNDERSTAND);
                 }
-                
+
                 //TODO what should be do with the Ulitmate Receiver? Axis2 is ultimate Receiver most of the time
                 //should we support that as well
             } else {