axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r160854 [1/2] - in webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/context/ core/src/org/apache/axis/deployment/ core/src/org/apache/axis/description/ core/src/org/apache/axis/engine/ core/src/org/apache/axis/modules/ core/src/org/apache/axis/phaseresolver/ core/src/org/apache/axis/receivers/ core/src/org/apache/axis/transport/http/ core/src/org/apache/axis/transport/mail/ core/src/org/apache/axis/util/ core/test/org/apache/axis/deployment/ core/test/org/apache/axis/description/ core/test/org/apache/axis/engine/ samples/test/org/apache/axis/clientapi/ samples/test/org/apache/axis/engine/ samples/test/org/apache/axis/integration/
Date Mon, 11 Apr 2005 10:20:11 GMT
Author: hemapani
Date: Mon Apr 11 03:19:59 2005
New Revision: 160854

URL: http://svn.apache.org/viewcvs?view=rev&rev=160854
Log:
first refactroing according to the summit f2f decisions, building up context and engine

Added:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AbstractContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfiguration.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageSender.java
      - copied, changed from r160513, webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Sender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SimplePhase.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/modules/
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/modules/Module.java
Removed:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AxisContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/GlobalContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Dispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistry.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ReceiverLocator.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Sender.java
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Invoker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ModuleContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/OperationContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ServiceContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/EngineRegistryFactoryImpl.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisGlobal.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisModule.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/DescriptionConstants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/PhasesIncludeImpl.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryFactory.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ExecutionChain.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/InOutSyncReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailWorker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/description/RegistryTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Mon Apr 11 03:19:59 2005
@@ -28,7 +28,7 @@
 import org.apache.axis.description.AxisTransportOut;
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.engine.EngineRegistryImpl;
 import org.apache.axis.om.OMException;
 import org.apache.axis.om.SOAPEnvelope;
@@ -44,7 +44,7 @@
     /**
      * Field registry
      */
-    private EngineRegistry registry;
+    private EngineConfiguration registry;
 
     /**
      * Field log

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Invoker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Invoker.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Invoker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Invoker.java Mon Apr 11 03:19:59 2005
@@ -17,7 +17,7 @@
 
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.engine.AxisEngine;
-import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.transport.TransportReceiver;
 
 /**
@@ -32,7 +32,7 @@
     /**
      * Field registry
      */
-    private EngineRegistry registry;
+    private EngineConfiguration registry;
 
     /**
      * Field reqMsgContext
@@ -53,7 +53,7 @@
      * @param callback
      */
     public Invoker(MessageContext msgContext, AxisEngine engine,
-                   EngineRegistry reg, Callback callback) {
+                   EngineConfiguration reg, Callback callback) {
         this.engine = engine;
         this.reqMsgContext = msgContext;
         this.callback = callback;

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AbstractContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AbstractContext.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AbstractContext.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/AbstractContext.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,83 @@
+package org.apache.axis.context;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * 
+ */
+public abstract class AbstractContext implements Serializable{
+    
+    protected transient HashMap nonPersistentMap;
+    protected HashMap persistentMap;
+
+    protected AbstractContext() {
+        this.persistentMap = new HashMap();
+        this.nonPersistentMap = new HashMap();
+    }
+
+    /**
+     * Store an object. depending on the persistent flag the
+     * object is either saved in the persistent way or the non-persistent
+     * way
+     * @param key
+     * @param value
+     * @param persistent
+     */
+    public void put(Object key,Object value,boolean persistent){
+        if (persistent){
+            persistentMap.put(key,value);
+        }else{
+            nonPersistentMap.put(key,value);
+        }
+    }
+
+    /**
+     * Store an object with the default persistent flag.
+     * default is no persistance
+     * @param key
+     * @param value
+     */
+    public void put(Object key,Object value){
+        this.put(key,value,false);
+    }
+     /**
+      * Retrieve an object. Default search is done in the non persistent
+      * group
+      * @param key
+      * @return
+      */
+    public Object get(Object key){
+       return this.get(key,false); //todo Do we need to have the default search extended to
+                                         //todo search the persistent map as well
+    }
+
+    /**
+     *
+     * @param key
+     * @param persistent
+     * @return
+     */
+    public Object get(Object key,boolean persistent){
+        if (persistent){
+            return persistentMap.get(key);
+        }else{
+            return nonPersistentMap.get(key);
+        }
+    }
+
+}

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java Mon Apr 11 03:19:59 2005
@@ -18,16 +18,58 @@
  *  Runtime state of the engine
  */
 
-import org.apache.axis.context.AxisContext;
-
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Map;
 
-public class EngineContext extends AxisContext{
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.PhasesInclude;
+import org.apache.axis.description.PhasesIncludeImpl;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.EngineConfiguration;
+
+public class EngineContext extends AbstractContext implements PhasesInclude{
 
-    //private EngineConfiguration engineConfig;
+    private EngineConfiguration engineConfig;
     private Map serviceContextMap;
     private Map sessionContextMap;
     private Map moduleContextMap;
+    
+    
+    private PhasesInclude phaseInclude; 
+    
+    public EngineContext(EngineConfiguration registry){
+        this.engineConfig = registry;
+        serviceContextMap = new HashMap();
+        moduleContextMap = new HashMap();
+        sessionContextMap = new HashMap();
+        phaseInclude = new PhasesIncludeImpl();
+      
+    }
+    
+    /**
+     * The method is used to do the intialization of the EngineContext, right now we know that
+     * module.init(..) is called here
+     * @throws AxisFault
+     */
+    
+    
+    public void init() throws AxisFault{
+    
+    }
+    
+    
+    public void addService(ServiceContext service){
+        serviceContextMap.put(service.getServiceConfig().getName(),service);
+    }
+    
+    public ServiceContext getService(QName serviceName){
+        return (ServiceContext)serviceContextMap.get(serviceName);
+    
+    }
+    
+    
 
     
 
@@ -35,5 +77,38 @@
 
 
 
+
+    /**
+     * @return
+     */
+    public EngineConfiguration getEngineConfig() {
+        return engineConfig;
+    }
+
+    /**
+     * @param configuration
+     */
+    public void setEngineConfig(EngineConfiguration configuration) {
+        engineConfig = configuration;
+    }
+
+  
+    /**
+     * @param flow
+     * @return
+     * @throws AxisFault
+     */
+    public ArrayList getPhases(int flow) throws AxisFault {
+        return phaseInclude.getPhases(flow);
+    }
+
+    /**
+     * @param phases
+     * @param flow
+     * @throws AxisFault
+     */
+    public void setPhases(ArrayList phases, int flow) throws AxisFault {
+        phaseInclude.setPhases(phases, flow);
+    }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContext.java Mon Apr 11 03:19:59 2005
@@ -18,12 +18,12 @@
  * 
  */
 
-import org.apache.axis.context.AxisContext;
+import org.apache.axis.context.AbstractContext;
 
 import java.util.Map;
 import java.util.HashMap;
 
-public class MEPContext  extends AxisContext{
+public class MEPContext  extends AbstractContext{
     private Map messageContextMap;
     private String mepId;
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java Mon Apr 11 03:19:59 2005
@@ -23,12 +23,9 @@
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.addressing.miheaders.RelatesTo;
 import org.apache.axis.addressing.om.MessageInformationHeadersCollection;
-import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.AxisService;
 import org.apache.axis.description.AxisTransportIn;
 import org.apache.axis.description.AxisTransportOut;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.engine.ExecutionChain;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.SOAPEnvelope;
@@ -41,6 +38,7 @@
  * artifacts does not keep states foward from the execution.
  */
 public class MessageContext {
+
     /**
      * Field messageStyle
      */
@@ -56,7 +54,6 @@
      */
     public static final String PASSWORD = "PASSWD";
 
-
     /**
      * Field SOAP_ACTION
      */
@@ -82,15 +79,11 @@
      */
     public static final String TRANSPORT_SUCCEED = "TRANSPORT_SUCCEED";
 
-
-
     /**
      * Field processingFault
      */
     private boolean processingFault = false;
 
-
-
     /**
      * Addressing Information for Axis 2
      * Following Properties will be kept inside this, these fields will be initially filled by
@@ -100,24 +93,24 @@
 
     MessageInformationHeadersCollection messageInformationHeaders;
 
+    private EngineContext engineContext;
 
     private final ExecutionChain chain;
 
+    private ServiceContext serviceContext;
+
+    private OperationContext operationContext;
+
     private AxisTransportIn transportIn;
-    
+
     private AxisTransportOut transportOut;
-    
+
     /**
      * Field properties
      */
     private final Map properties;
 
     /**
-     * Field globalContext
-     */
-    private final GlobalContext globalContext;
-
-    /**
      * Field sessionContext
      */
     private final SessionContext sessionContext;
@@ -125,7 +118,6 @@
     /**
      * Field service
      */
-    private AxisService service;
 
     /**
      * Field envelope
@@ -153,11 +145,6 @@
     private String messageID;
 
     /**
-     * Field operation
-     */
-    private AxisOperation operation;
-
-    /**
      * Field newThreadRequired
      */
     private boolean newThreadRequired = false;
@@ -171,25 +158,21 @@
      * Field soapOperationElement
      */
     private OMElement soapOperationElement;
-    
-    
+
     private boolean paused = false;
-    
-    
-    
+
     public MessageContext(MessageContext oldMessageContext) throws AxisFault {
-        this(	oldMessageContext.getGlobalContext().getRegistry(), 
-                oldMessageContext.getProperties(), 
-                oldMessageContext.getSessionContext(), 
-                oldMessageContext.getTransportIn(), 
-                oldMessageContext.getTransportOut());
+        this(
+            oldMessageContext.getEngineContext(),
+            oldMessageContext.getProperties(),
+            oldMessageContext.getSessionContext(),
+            oldMessageContext.getTransportIn(),
+            oldMessageContext.getTransportOut());
         this.messageInformationHeaders = oldMessageContext.getMessageInformationHeaders();
         this.serverSide = oldMessageContext.isServerSide();
-        this.service = oldMessageContext.getService();
-        
+        this.serviceContext = oldMessageContext.getServiceContext();
+
     }
-    
-    
 
     /**
      * @param er            registry
@@ -197,12 +180,14 @@
      * @param sessionContext    of the message context, should be null if no sessionContext
      * @throws AxisFault
      */
-    public MessageContext(EngineRegistry er, 
-            Map initialProperties, 
-            SessionContext sessionContext,
-            AxisTransportIn transportIn,AxisTransportOut transportOut)
-            throws AxisFault {
-        this.globalContext = new GlobalContext(er);
+    public MessageContext(
+        EngineContext engineContext,
+        Map initialProperties,
+        SessionContext sessionContext,
+        AxisTransportIn transportIn,
+        AxisTransportOut transportOut)
+        throws AxisFault {
+        this.engineContext = engineContext;
         if (sessionContext == null) {
             this.sessionContext = new SimpleSessionContext();
         } else {
@@ -216,7 +201,7 @@
         messageInformationHeaders = new MessageInformationHeadersCollection();
         this.transportIn = transportIn;
         this.transportOut = transportOut;
-        
+
     }
 
     /**
@@ -236,13 +221,6 @@
     /**
      * @return
      */
-    public GlobalContext getGlobalContext() {
-        return globalContext;
-    }
-
-    /**
-     * @return
-     */
     public boolean isInFaultFlow() {
         return inFaultFlow;
     }
@@ -406,27 +384,6 @@
     /**
      * @return
      */
-    public AxisService getService() {
-        return service;
-    }
-
-    /**
-     * @return
-     */
-    public AxisOperation getOperation() {
-        return operation;
-    }
-
-    /**
-     * @param operation
-     */
-    public void setOperation(AxisOperation operation) {
-        this.operation = operation;
-    }
-
-    /**
-     * @return
-     */
     public boolean isNewThreadRequired() {
         return newThreadRequired;
     }
@@ -439,13 +396,6 @@
     }
 
     /**
-     * @param service
-     */
-    public void setService(AxisService service) {
-        this.service = service;
-    }
-
-    /**
      * @return
      */
     public String getMessageStyle() {
@@ -470,8 +420,6 @@
         return this.chain;
     }
 
-
-
     /**
      * @return
      */
@@ -507,16 +455,16 @@
         return properties;
     }
 
-    public void setWSAAction(String actionURI){
+    public void setWSAAction(String actionURI) {
         messageInformationHeaders.setAction(actionURI);
     }
-    public String getWSAAction(){
+    public String getWSAAction() {
         return messageInformationHeaders.getAction();
     }
-    public void setWSAMessageId(String messageID){
+    public void setWSAMessageId(String messageID) {
         messageInformationHeaders.setMessageId(messageID);
     }
-    public String getWSAMessageId(){
+    public String getWSAMessageId() {
         return messageInformationHeaders.getMessageId();
     }
 
@@ -566,6 +514,52 @@
      */
     public void setTransportOut(AxisTransportOut out) {
         transportOut = out;
+    }
+
+    /**
+     * @return
+     */
+    public EngineContext getEngineContext() {
+        return engineContext;
+    }
+
+    /**
+     * @param context
+     */
+    public void setEngineContext(EngineContext context) {
+        engineContext = context;
+    }
+
+    public String getAction() {
+        return messageInformationHeaders.getAction();
+    }
+
+    /**
+     * @return
+     */
+    public OperationContext getOperationContext() {
+        return operationContext;
+    }
+
+    /**
+     * @return
+     */
+    public ServiceContext getServiceContext() {
+        return serviceContext;
+    }
+
+    /**
+     * @param context
+     */
+    public void setOperationContext(OperationContext context) {
+        operationContext = context;
+    }
+
+    /**
+     * @param context
+     */
+    public void setServiceContext(ServiceContext context) {
+        serviceContext = context;
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ModuleContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ModuleContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ModuleContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ModuleContext.java Mon Apr 11 03:19:59 2005
@@ -1,5 +1,7 @@
 package org.apache.axis.context;
 
+import org.apache.axis.description.AxisModule;
+
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -17,15 +19,17 @@
  *
  * 
  */
-public class ModuleContext extends AxisContext{
-    private String moduleId;
-
-    public String getModuleId() {
-        return moduleId;
+public class ModuleContext extends AbstractContext{
+    private AxisModule moduleConfig;
+    
+    public ModuleContext(AxisModule module){
+        this.moduleConfig = module;
     }
-
-    public void setModuleId(String moduleId) {
-        this.moduleId = moduleId;
+    /**
+     * @return
+     */
+    public AxisModule getModuleConfig() {
+        return moduleConfig;
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/OperationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/OperationContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/OperationContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/OperationContext.java Mon Apr 11 03:19:59 2005
@@ -18,27 +18,21 @@
  * 
  */
 
-import org.apache.axis.context.AxisContext;
+import org.apache.axis.description.AxisOperation;
 
 import java.util.Map;
 import java.util.HashMap;
 
-public class OperationContext extends AxisContext{
-    private Map mepContextMap;
-    private String opId;
-
-   
-    public String getOpId() {
-        return opId;
-    }
+import javax.xml.namespace.QName;
 
-    public void setOpId(String opId) {
-        this.opId = opId;
-    }
+public class OperationContext extends AbstractContext{
+    private Map mepContextMap;
+    private AxisOperation operationConfig;
 
-    public OperationContext() {
+     public OperationContext(AxisOperation operationConfig) {
         super();
         this.mepContextMap = new HashMap();
+        this.operationConfig = operationConfig;
     }
 
     public void addMepContext(MEPContext ctxt){
@@ -53,4 +47,22 @@
         mepContextMap.remove(ctxt.getMepId());
         return ctxt;
     }
+    /**
+     * @return
+     */
+    public AxisOperation getOperationConfig() {
+        return operationConfig;
+    }
+
+    /**
+     * @param operation
+     */
+    public void setOperationConfig(AxisOperation operation) {
+        operationConfig = operation;
+    }
+    
+    public QName getName(){
+        return operationConfig.getName();
+    }
+
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ServiceContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ServiceContext.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ServiceContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ServiceContext.java Mon Apr 11 03:19:59 2005
@@ -18,21 +18,32 @@
  * 
  */
 
-import org.apache.axis.context.AxisContext;
-
-import java.util.Map;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.PhasesInclude;
+import org.apache.axis.description.PhasesIncludeImpl;
+import org.apache.axis.engine.AxisFault;
 
-public class ServiceContext  extends AxisContext{
+public class ServiceContext  extends AbstractContext implements PhasesInclude{
     private Map operationContextMap;
+    private AxisService serviceConfig;
+    private PhasesInclude phaseInclude;
+   
 
-    public ServiceContext() {
+    public ServiceContext(AxisService serviceConfig) {
         super();
+        this.serviceConfig = serviceConfig;
         this.operationContextMap = new HashMap();
+        phaseInclude = new PhasesIncludeImpl();
     }
 
     public void addOperationContext(OperationContext ctxt){
-        this.operationContextMap.put(ctxt.getOpId(),ctxt);
+        this.operationContextMap.put(ctxt.getName(),ctxt);
     }
 
     public OperationContext getOperationContext(String opId){
@@ -40,9 +51,60 @@
     }
 
     public OperationContext removeOperationContext(OperationContext ctxt){
-        operationContextMap.remove(ctxt.getOpId());
+        operationContextMap.remove(ctxt.getName());
         return ctxt;
     }
 
+
+    /**
+     * @return
+     */
+    public AxisService getServiceConfig() {
+        return serviceConfig;
+    }
+    
+    public QName getName(){
+        return serviceConfig.getName();
+    }
+  
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        return phaseInclude.hashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        return phaseInclude.toString();
+    }
+
+    /**
+     * @param phases
+     * @param flow
+     * @throws AxisFault
+     */
+    public void setPhases(ArrayList phases, int flow) throws AxisFault {
+        phaseInclude.setPhases(phases, flow);
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        return phaseInclude.equals(obj);
+    }
+
+    /**
+     * @param flow
+     * @return
+     * @throws AxisFault
+     */
+    public ArrayList getPhases(int flow) throws AxisFault {
+        return phaseInclude.getPhases(flow);
+    }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Mon Apr 11 03:19:59 2005
@@ -61,7 +61,7 @@
      * this ref will pass to engine when it call start()
      * method
      */
-    private EngineRegistry engineRegistry;
+    private EngineConfiguration engineRegistry;
 
     /**
      * this constaructor for the testing
@@ -99,7 +99,7 @@
      *
      * @param engineRegistry
      */
-    public DeploymentEngine(EngineRegistry engineRegistry) {
+    public DeploymentEngine(EngineConfiguration engineRegistry) {
         this.engineRegistry = engineRegistry;
     }
 
@@ -157,7 +157,7 @@
      *
      * @return
      */
-    public EngineRegistry getEngineRegistry() {
+    public EngineConfiguration getEngineRegistry() {
         return engineRegistry;
     }
 
@@ -167,7 +167,7 @@
      * @return
      * @throws AxisFault
      */
-    public EngineRegistry start() throws AxisFault, DeploymentException, XMLStreamException {
+    public EngineConfiguration start() throws AxisFault, DeploymentException, XMLStreamException {
         //String fileName;
         if (serverConfigName == null) {
             throw new DeploymentException("path to Server.xml can not be NUll");
@@ -248,8 +248,8 @@
         scheduler.schedule(new SchedulerTask(engine, folderName), new DeploymentIterator());
     }
 
-    private EngineRegistry createEngineRegistry() throws AxisFault {
-        EngineRegistry newEngineRegisty;
+    private EngineConfiguration createEngineRegistry() throws AxisFault {
+        EngineConfiguration newEngineRegisty;
 
         server = new AxisGlobal();
         newEngineRegisty = new EngineRegistryImpl(server);
@@ -325,7 +325,7 @@
             String readInProviderName = currentFileItem.getProvideName();
             if (readInProviderName != null && !"".equals(readInProviderName)) {
                 Class provider = Class.forName(currentFileItem.getProvideName(), true, loader1);
-                service.setProvider((Provider) provider.newInstance());
+                service.setMessageReceiver((Provider) provider.newInstance());
             }
         } catch (Exception e) {
             throw new AxisFault(e.getMessage(), e);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/EngineRegistryFactoryImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/EngineRegistryFactoryImpl.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/EngineRegistryFactoryImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/EngineRegistryFactoryImpl.java Mon Apr 11 03:19:59 2005
@@ -17,14 +17,14 @@
 package org.apache.axis.deployment;
 
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.engine.EngineRegistryFactory;
 
 import javax.xml.stream.XMLStreamException;
 
 
 public class EngineRegistryFactoryImpl implements EngineRegistryFactory {
-    public EngineRegistry createEngineRegistry(String file) throws AxisFault {
+    public EngineConfiguration createEngineRegistry(String file) throws AxisFault {
         try {
             DeploymentEngine deploymentEngine = new DeploymentEngine(file);
             return deploymentEngine.start();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisGlobal.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisGlobal.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisGlobal.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisGlobal.java Mon Apr 11 03:19:59 2005
@@ -15,13 +15,12 @@
  */
 package org.apache.axis.description;
 
-import org.apache.axis.engine.AxisFault;
-
-import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import javax.xml.namespace.QName;
+
 /**
  * <p>This holds the information shown in the global scope. The information are all
  * that not goes in to the Transport or a Service. This has two types of Info. </p>
@@ -34,18 +33,13 @@
  * <p>Note: handlers in the server.xml file are not suported for M1, only way to put a
  * global handler is via a modules</p>
  */
-public class AxisGlobal implements ParameterInclude, PhasesInclude {
+public class AxisGlobal implements ParameterInclude {
     /**
      * Field paramInclude
      */
     protected final ParameterInclude paramInclude;
 
     /**
-     * Field phasesInclude
-     */
-    protected final PhasesInclude phasesInclude;
-
-    /**
      * Field modules
      */
     protected final List modules;
@@ -57,7 +51,6 @@
      */
     public AxisGlobal() {
         paramInclude = new ParameterIncludeImpl();
-        phasesInclude = new PhasesIncludeImpl();
         modules = new ArrayList();
     }
 
@@ -98,21 +91,5 @@
         paramInclude.addParameter(param);
     }
 
-    /**
-     * @param flow
-     * @return
-     * @throws AxisFault
-     */
-    public ArrayList getPhases(int flow) throws AxisFault {
-        return phasesInclude.getPhases(flow);
-    }
-
-    /**
-     * @param phases
-     * @param flow
-     * @throws AxisFault
-     */
-    public void setPhases(ArrayList phases, int flow) throws AxisFault {
-        phasesInclude.setPhases(phases, flow);
-    }
+ 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisModule.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisModule.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisModule.java Mon Apr 11 03:19:59 2005
@@ -17,6 +17,8 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.axis.modules.Module;
+
 /**
  * <p>This holds the information about a Module. </p>
  * <ol>
@@ -27,6 +29,8 @@
  * has a module ref="." or avalible to a single service if service.xml have module ref=".."</p>
  */
 public class AxisModule implements FlowInclude, ParameterInclude {
+    
+    private Module module;
     /**
      * Field name
      */
@@ -127,4 +131,18 @@
     public void setName(QName name) {
         this.name = name;
     }
+    /**
+     * @return
+     */
+    public Module getModule() {
+        return module;
+    }
+
+    /**
+     * @param module
+     */
+    public void setModule(Module module) {
+        this.module = module;
+    }
+
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java Mon Apr 11 03:19:59 2005
@@ -15,35 +15,34 @@
  */
 package org.apache.axis.description;
 
-import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.Provider;
-import org.apache.wsdl.WSDLService;
-import org.apache.wsdl.impl.WSDLServiceImpl;
-
-import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.MessageReceiver;
+import org.apache.wsdl.WSDLService;
+import org.apache.wsdl.impl.WSDLServiceImpl;
+
 /**
  * Class AxisService
  */
 public class AxisService extends WSDLServiceImpl
-        implements WSDLService, ParameterInclude, FlowInclude, PhasesInclude,
+        implements WSDLService, ParameterInclude, FlowInclude,
         DescriptionConstants {
     /**
      * TODO this should be in the WSDLInterface, yet we want it to have in the the
      * Services, so we put this here for M1 until we foud better way to do that
      */
     protected final HashMap operationsMap = new HashMap();
-
+    
     /**
      * Constructor AxisService
      */
     public AxisService() {
         this.setComponentProperty(MODULEREF_KEY, new ArrayList());
         this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
-        this.setComponentProperty(PHASES_KEY, new PhasesIncludeImpl());
     }
 
     /**
@@ -193,9 +192,9 @@
      *
      * @param provider
      */
-    public void setProvider(Provider provider) {
-        if (provider != null) {
-            this.setComponentProperty(PROVIDER_KEY, provider);
+    public void setMessageReceiver(MessageReceiver receiver) {
+        if (receiver != null) {
+            this.setComponentProperty(MESSAGE_RECIVER_KEY, receiver);
         }
     }
 
@@ -209,8 +208,8 @@
      *
      * @return
      */
-    public Provider getProvider() {
-        return (Provider) this.getComponentProperty(PROVIDER_KEY);
+    public MessageReceiver getMessageReceiver() {
+        return (MessageReceiver) this.getComponentProperty(MESSAGE_RECIVER_KEY);
     }
 
     /*
@@ -248,39 +247,7 @@
      * @see org.apache.axis.description.PhasesInclude#getPhases(java.util.ArrayList, int)
      */
 
-    /**
-     * Method setPhases
-     *
-     * @param phases
-     * @param flow
-     * @throws AxisFault
-     */
-    public void setPhases(ArrayList phases, int flow) throws AxisFault {
-        if (phases == null) {
-            return;
-        }
-        PhasesIncludeImpl phaseInclude =
-                (PhasesIncludeImpl) this.getComponentProperty(PHASES_KEY);
-        phaseInclude.setPhases(phases, flow);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.axis.description.PhasesInclude#getPhases(int)
-     */
-
-    /**
-     * Method getPhases
-     *
-     * @param flow
-     * @return
-     * @throws AxisFault
-     */
-    public ArrayList getPhases(int flow) throws AxisFault {
-        PhasesIncludeImpl phaseInclude =
-                (PhasesIncludeImpl) this.getComponentProperty(PHASES_KEY);
-        return (ArrayList) phaseInclude.getPhases(flow);
-    }
+  
 
     /*
      * (non-Javadoc)
@@ -438,4 +405,6 @@
     public HashMap getOperations() {
         return operationsMap;
     }
+    
+  
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/DescriptionConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/DescriptionConstants.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/DescriptionConstants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/DescriptionConstants.java Mon Apr 11 03:19:59 2005
@@ -59,7 +59,7 @@
     /**
      * Field PROVIDER_KEY
      */
-    public static final String PROVIDER_KEY = "PROVIDER_KEY";
+    public static final String MESSAGE_RECIVER_KEY = "PROVIDER_KEY";
 
     /**
      * Field STYLE_KEY

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/PhasesIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/PhasesIncludeImpl.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/PhasesIncludeImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/PhasesIncludeImpl.java Mon Apr 11 03:19:59 2005
@@ -16,7 +16,7 @@
 package org.apache.axis.description;
 
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineConfiguration;
 
 import java.util.ArrayList;
 
@@ -47,11 +47,11 @@
      * @throws AxisFault
      */
     public ArrayList getPhases(int flow) throws AxisFault {
-        if (flow == EngineRegistry.INFLOW) {
+        if (flow == EngineConfiguration.INFLOW) {
             return inflow;
-        } else if (flow == EngineRegistry.OUTFLOW) {
+        } else if (flow == EngineConfiguration.OUTFLOW) {
             return outflow;
-        } else if (flow == EngineRegistry.FAULTFLOW) {
+        } else if (flow == EngineConfiguration.FAULTFLOW) {
             return faultflow;
         } else {
             throw new AxisFault("Unknown type flow ");
@@ -66,11 +66,11 @@
          * @throws AxisFault
          */
     public void setPhases(ArrayList phases, int flow) throws AxisFault {
-        if (flow == EngineRegistry.INFLOW) {
+        if (flow == EngineConfiguration.INFLOW) {
             inflow = phases;
-        } else if (flow == EngineRegistry.OUTFLOW) {
+        } else if (flow == EngineConfiguration.OUTFLOW) {
             outflow = phases;
-        } else if (flow == EngineRegistry.FAULTFLOW) {
+        } else if (flow == EngineConfiguration.FAULTFLOW) {
             faultflow = phases;
         } else {
             throw new AxisFault("Unknown type flow ");

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.context.OperationContext;
+import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.HandlerMetadata;
+import org.apache.axis.handlers.AbstractHandler;
+
+/**
+ * Class Dispatcher
+ */
+public class AddressingBasedDispatcher extends AbstractHandler implements Handler {
+    /**
+     * Field NAME
+     */
+    public static final QName NAME = new QName("http://axis.ws.apache.org", "AddressingBasedDispatcher");
+    private AxisService service;
+
+    /**
+     * Constructor Dispatcher
+     */
+    public AddressingBasedDispatcher() {
+        init(new HandlerMetadata(NAME));
+    }
+
+    /**
+     * Method invoke
+     *
+     * @param msgctx
+     * @throws AxisFault
+     */
+    public void invoke(MessageContext msgctx) throws AxisFault {
+        if (msgctx.getServiceContext() == null) {
+            EndpointReference toEPR = msgctx.getTo();
+            QName serviceName = new QName(toEPR.getAddress());
+            service = msgctx.getEngineContext().getEngineConfig().getService(serviceName);
+            ServiceContext serviceContext = new ServiceContext(service);
+            if (service != null) {
+                msgctx.setServiceContext(serviceContext);
+                msgctx.setMessageStyle(service.getStyle());
+                // let add the Handlers
+                ExecutionChain chain = msgctx.getExecutionChain();
+                chain.addPhases(serviceContext.getPhases(EngineConfiguration.INFLOW));
+
+            } else {
+                throw new AxisFault("Both the URI and SOAP_ACTION are Null");
+            }
+
+            String action = (String) msgctx.getProperty(MessageContext.SOAP_ACTION);
+            QName operationName = new QName(action);
+            AxisOperation op = service.getOperation(operationName);
+            if (op != null) {
+                OperationContext opContext = new OperationContext(op);
+                msgctx.setOperationContext(opContext);
+            }
+        } else {
+            // TODO client side service Dispatch ,, What this really mean?
+        }
+    }
+}

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java Mon Apr 11 03:19:59 2005
@@ -15,11 +15,9 @@
  */
 package org.apache.axis.engine;
 
-
-
+import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
-import org.apache.axis.description.AxisGlobal;
-import org.apache.axis.description.AxisService;
+import org.apache.axis.context.ServiceContext;
 import org.apache.axis.description.AxisTransportIn;
 import org.apache.axis.handlers.OpNameFinder;
 import org.apache.axis.om.OMFactory;
@@ -39,7 +37,6 @@
      */
     private Log log = LogFactory.getLog(getClass());
 
-
     /**
      * Constructor AxisEngine
      *
@@ -62,8 +59,38 @@
      * @see Handler
      */
     public void send(MessageContext context) throws AxisFault {
-        executeOutFlow(context, EngineRegistry.OUTFLOW);
-        log.info("end the send()");
+        try {
+            ExecutionChain chain = context.getExecutionChain();
+            ServiceContext serviceContext = context.getServiceContext();
+            if (serviceContext != null) {
+
+                // what are we suppose to do in the client side
+                // how the client side handlers are deployed ??? this is a hack and no client side handlers
+                chain.addPhases(serviceContext.getPhases(EngineConfiguration.OUTFLOW));
+            } else {
+                if (context.isServerSide() && !context.isProcessingFault()) {
+                    throw new AxisFault("in Server Side there must be service object");
+                }
+            }
+
+            // Add the phases that are are at Global scope
+            chain.addPhases(context.getEngineContext().getPhases(EngineConfiguration.OUTFLOW));
+
+            // Receiving is always a matter of running the transport handlers first
+            AxisTransportIn transport = context.getTransportIn();
+            chain.addPhases(transport.getPhases(EngineConfiguration.OUTFLOW));
+
+            // startet rolling
+            chain.invoke(context);
+
+            TransportSender sender = context.getTransportOut().getSender();
+            sender.invoke(context);
+
+        } catch (AxisFault error) {
+            error.printStackTrace();
+            handleFault(context, error);
+        }
+
     }
 
     /**
@@ -77,43 +104,58 @@
      * @see ExecutionChain
      * @see Phase
      * @see Handler
-     */                                   
+     */
     public void receive(MessageContext context) throws AxisFault {
         try {
 
             log.info("starting the out flow");
 
+            EngineContext engContext = context.getEngineContext();
+
             // let us always start with a fresh EC
             ExecutionChain chain = context.getExecutionChain();
 
-            // Receiving is always a matter of running the transport handlers first
+            // Construct the transport part of the Handlers
             AxisTransportIn transport = context.getTransportIn();
             if (transport != null) {
                 log.info("Using the transport" + transport.getName());
-                chain.addPhases(transport.getPhases(EngineRegistry.INFLOW));
+                chain.addPhases(transport.getPhases(EngineConfiguration.INFLOW));
             }
 
-            // Add the phases that are are at Global scope
-            AxisGlobal global =
-                    context.getGlobalContext().getRegistry().getGlobal();
-            chain.addPhases(global.getPhases(EngineRegistry.INFLOW));
+            //add the Global flow
+            chain.addPhases(engContext.getPhases(EngineConfiguration.INFLOW));
 
             // create a Dispatch Phase and add it to the Execution Chain
-            if(context.isServerSide()){
-                Dispatcher dispatcher = new Dispatcher();
-                Phase dispatchPhase = new Phase("DispatchPhase");
+            Phase dispatchPhase = chain.getPhase(SimplePhase.DISPATCH_PHASE);
+            if (dispatchPhase == null) {
+                dispatchPhase = new SimplePhase(SimplePhase.DISPATCH_PHASE);
+            }
+
+            if (context.isServerSide()) {
+                //This chain is the default Service diaptacher, the users may opt to overide this by 
+                //adding an Handlers to the DispatchPhase. 
+                AddressingBasedDispatcher dispatcher = new AddressingBasedDispatcher();
                 dispatchPhase.addHandler(dispatcher);
-                chain.addPhase(dispatchPhase);
 
-                // Start rolling the Service Handlers will,be added by the Dispatcher
-                chain.invoke(context);
-            
+            }
+
+            //Service handlers are added to ExecutionChain by this Handler
+            ServiceHandlersChainBuilder handlerChainBuilder = new ServiceHandlersChainBuilder();
+            dispatchPhase.addHandler(handlerChainBuilder);
+            chain.addPhase(dispatchPhase);
+
+            // Start rolling the Service Handlers will,be added by the Dispatcher
+            chain.invoke(context);
+
+            if (context.isServerSide()) {
                 // add invoke Phase
                 Handler opNameFinder = new OpNameFinder();
                 opNameFinder.invoke(context);
-                Receiver reciver = ReceiverLocator.locateReceiver(context);
-                reciver.invoke(context);
-            }
+                MessageReceiver reciver =
+                    context.getServiceContext().getServiceConfig().getMessageReceiver();
+                reciver.recieve(context);
+             }
+
             log.info("ending the out flow");
         } catch (Throwable e) {
             handleFault(context, e);
@@ -129,28 +171,35 @@
      * @param e
      * @throws AxisFault
      */
-    private void handleFault(MessageContext context, Throwable e)
-            throws AxisFault {
+    private void handleFault(MessageContext context, Throwable e) throws AxisFault {
         boolean serverSide = context.isServerSide();
         log.error("Error Ocurred", e);
         if (serverSide && !context.isProcessingFault()) {
             context.setProcessingFault(true);
 
             // create a SOAP envelope with the Fault
-            MessageContext faultContext = new MessageContext(context.getGlobalContext().getRegistry(),
-                context.getProperties(),context.getSessionContext(),context.getTransportIn(),context.getTransportOut());
+            MessageContext faultContext =
+                new MessageContext(
+                    context.getEngineContext(),
+                    context.getProperties(),
+                    context.getSessionContext(),
+                    context.getTransportIn(),
+                    context.getTransportOut());
             faultContext.setProcessingFault(true);
             faultContext.setServerSide(true);
-            SOAPEnvelope envelope =
-                    OMFactory.newInstance().getDefaultEnvelope();
+            SOAPEnvelope envelope = OMFactory.newInstance().getDefaultEnvelope();
 
             // TODO do we need to set old Headers back?
             SOAPBody body = envelope.getBody();
             body.addFault(new AxisFault(e.getMessage(), e));
             faultContext.setEnvelope(envelope);
-
-             // send the error
-            executeOutFlow(faultContext, EngineRegistry.FAULTFLOW);
+            
+            ExecutionChain chain = faultContext.getExecutionChain();
+            chain.addPhases(context.getServiceContext().getPhases(EngineConfiguration.FAULTFLOW));
+            chain.invoke(faultContext);
+            // send the error
+            TransportSender sender = context.getTransportOut().getSender();
+            sender.invoke(context);
         } else if (!serverSide) {
 
             // if at the client side throw the exception
@@ -159,53 +208,6 @@
 
             // TODO log and exit
             log.error("Error in fault flow", e);
-        }
-    }
-
-    /**
-         * <p>This method shows the execution of sending the SOAP message. That can be either a
-         * sending the message at the Client side or the sending the response at the Server side or the
-         * Seding the fault flow at the Server side.</p>
-         *
-         * @param context
-         * @param flow
-         * @throws AxisFault
-         */
-    private void executeOutFlow(MessageContext context, int flow)
-            throws AxisFault {
-        try {
-            ExecutionChain chain = context.getExecutionChain();
-            AxisService service = context.getService();
-            if (service != null) {
-
-                // what are we suppose to do in the client side
-                // how the client side handlers are deployed ??? this is a hack and no client side handlers
-                chain.addPhases(service.getPhases(flow));
-            } else {
-                if (context.isServerSide() && !context.isProcessingFault()) {
-                    throw new AxisFault(
-                            "in Server Side there must be service object");
-                }
-            }
-
-            // Add the phases that are are at Global scope
-            AxisGlobal global =
-                    context.getGlobalContext().getRegistry().getGlobal();
-            chain.addPhases(global.getPhases(flow));
-
-            // Receiving is always a matter of running the transport handlers first
-            AxisTransportIn transport = context.getTransportIn();
-            chain.addPhases(transport.getPhases(flow));
-            
-            // startet rolling
-            chain.invoke(context);
-            
-            TransportSender sender = context.getTransportOut().getSender();
-            sender.invoke(context);
-            
-        } catch (AxisFault error) {
-            error.printStackTrace();
-            handleFault(context, error);
         }
     }
 }

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfiguration.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfiguration.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineConfiguration.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.*;
+
+/**
+ * The palce where all the Global states of Axis is kept.
+ * All the Global states kept in the <code>EngineRegistry</code> and all the
+ * Service states kept in the <code>MessageContext</code>. Other runtime
+ * artifacts does not keep states foward from the execution.
+ */
+public interface EngineConfiguration {
+    /**
+     * Field INFLOW
+     */
+    public static final int INFLOW = 10003;
+
+    /**
+     * Field OUTFLOW
+     */
+    public static final int OUTFLOW = 10004;
+
+    /**
+     * Field FAULTFLOW
+     */
+    public static final int FAULTFLOW = 10005;
+
+    /**
+     * Method getGlobal
+     *
+     * @return
+     * @throws AxisFault
+     */
+    public AxisGlobal getGlobal() throws AxisFault;
+
+    /**
+     * Method getService
+     *
+     * @param name
+     * @return
+     * @throws AxisFault
+     */
+    public AxisService getService(QName name) throws AxisFault;
+
+    /**
+     * Method addService
+     *
+     * @param service
+     * @throws AxisFault
+     */
+    public void addService(AxisService service) throws AxisFault;
+
+    /**
+     * Method removeService
+     *
+     * @param name
+     * @throws AxisFault
+     */
+    public void removeService(QName name) throws AxisFault;
+
+    /**
+     * Modules is read only as they can not deployed while runing
+     *
+     * @param name
+     * @return
+     * @throws AxisFault
+     */
+    public AxisModule getModule(QName name) throws AxisFault;
+
+    /**
+     * Method addMdoule
+     *
+     * @param module
+     * @throws AxisFault
+     */
+    public void addMdoule(AxisModule module) throws AxisFault;
+
+
+    /**
+     * Method getTransports
+     *
+     * @return
+     * @throws AxisFault
+     */
+    public HashMap getTransports() throws AxisFault;
+    /**
+     * To store the order of the phases
+     * @param inPhases
+     */
+    public ArrayList getInPhases();
+    public ArrayList getOutPhases();
+    public ArrayList getInFaultPhases() ;
+    public ArrayList getOutFaultPhases();
+    
+  
+
+    /**
+     * Method getServices
+     *
+     * @return
+     */
+    public HashMap getServices();
+
+    public Hashtable getFaulytServices();
+
+
+    public AxisTransportIn getTransportIn(QName name) throws AxisFault ;
+    public  void addTransportIn(AxisTransportIn transport) throws AxisFault;
+    public AxisTransportOut getTransportOut(QName name) throws AxisFault ;
+    public  void addTransportOut(AxisTransportOut transport) throws AxisFault ;
+    public HashMap getTransportsIn();
+    public HashMap getTransportsOut();
+
+}

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryFactory.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryFactory.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryFactory.java Mon Apr 11 03:19:59 2005
@@ -26,5 +26,5 @@
      * @return
      * @throws AxisFault
      */
-    public EngineRegistry createEngineRegistry(String file) throws AxisFault;
+    public EngineConfiguration createEngineRegistry(String file) throws AxisFault;
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineRegistryImpl.java Mon Apr 11 03:19:59 2005
@@ -30,7 +30,7 @@
 /**
  * Class EngineRegistryImpl
  */
-public class EngineRegistryImpl implements EngineRegistry {
+public class EngineRegistryImpl implements EngineConfiguration {
     /**
      * To store Erroness services
      */
@@ -65,8 +65,8 @@
      */
     private ArrayList inPhases;
     private ArrayList outPhases;
-    private ArrayList faultPhases;
-
+    private ArrayList inFaultPhases;
+    private ArrayList outFaultPhases;
     /**
      * Constructor EngineRegistryImpl
      *
@@ -76,7 +76,8 @@
         this.global = global;
         inPhases = new ArrayList();
         outPhases = new ArrayList();
-        faultPhases = new ArrayList();
+        inFaultPhases = new ArrayList();
+        outFaultPhases = new ArrayList();
         errornesServices = new Hashtable();
     }
 
@@ -213,10 +214,7 @@
         this.outPhases = outPhases;
     }
 
-    public void setFaultPhases(ArrayList faultPhases) {
-        this.faultPhases = faultPhases;
-    }
-
+   
     public ArrayList getInPhases() {
         return inPhases;
     }
@@ -225,8 +223,34 @@
         return outPhases;
     }
 
-    public ArrayList getFaultPhases() {
-        return faultPhases;
+ 
+ 
+    /**
+     * @return
+     */
+    public ArrayList getInFaultPhases() {
+        return inFaultPhases;
+    }
+
+    /**
+     * @return
+     */
+    public ArrayList getOutFaultPhases() {
+        return outFaultPhases;
+    }
+
+    /**
+     * @param list
+     */
+    public void setInFaultPhases(ArrayList list) {
+        inFaultPhases = list;
+    }
+
+    /**
+     * @param list
+     */
+    public void setOutFaultPhases(ArrayList list) {
+        outFaultPhases = list;
     }
-  
+
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ExecutionChain.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ExecutionChain.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ExecutionChain.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ExecutionChain.java Mon Apr 11 03:19:59 2005
@@ -19,8 +19,6 @@
 import java.util.HashMap;
 import java.util.Stack;
 
-import javax.xml.namespace.QName;
-
 import org.apache.axis.context.MessageContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -76,7 +74,7 @@
     public void addPhases(ArrayList phases) {
         if ((phases != null) && !phases.isEmpty()) {
             for (int i = 0; i < phases.size(); i++) {
-                addPhase((Phase) phases.get(i));
+                addPhase((SimplePhase) phases.get(i));
             }
         }
     }
@@ -87,7 +85,7 @@
      * @param name
      * @return
      */
-    public Phase getPhase(QName name) {
+    public Phase getPhase(String name) {
         return (Phase) phases.get(name);
     }
 
@@ -108,7 +106,7 @@
                     }
                     break;
                 }else{
-                    Phase phase = (Phase) executionList.get(indexOfPhaseToExecuted);
+                    SimplePhase phase = (SimplePhase) executionList.get(indexOfPhaseToExecuted);
                     if (phase != null) {
                         log.info("Invoke the Phase " + phase.getPhaseName());
                         phase.invoke(msgctx);
@@ -122,7 +120,7 @@
         } catch (Exception e) {
             log.info("Execution Chain failed with the " + e.getMessage());
             while (!executionStack.isEmpty()) {
-                Phase phase = (Phase) executionStack.pop();
+                SimplePhase phase = (SimplePhase) executionStack.pop();
                 phase.revoke(msgctx);
                 log.info("revoke the Phase " + phase.getPhaseName());
             }

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageReceiver.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageReceiver.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageReceiver.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import org.apache.axis.context.MessageContext;
+
+/**
+ * Interface Receiver
+ */
+public interface MessageReceiver{
+    public void recieve(MessageContext messgeCtx)throws AxisFault;
+}

Copied: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageSender.java (from r160513, webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Sender.java)
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageSender.java?view=diff&rev=160854&p1=webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Sender.java&r1=160513&p2=webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageSender.java&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Sender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/MessageSender.java Mon Apr 11 03:19:59 2005
@@ -15,12 +15,34 @@
  */
 package org.apache.axis.engine;
 
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.axis.addressing.om.MessageInformationHeadersCollection;
+import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 
 /**
  * Class Sender
  */
-public class Sender {
+public class MessageSender {
+    private EngineContext engineContext;
+    private MessageInformationHeadersCollection messageInfoHeaders;
+    
+    
+    
+    public MessageSender(EngineContext engineContext){
+        this.engineContext = engineContext;
+    }
+    
+    public MessageSender(InputStream in){
+        //TODO create the Engine Context
+    }
+    
+    public MessageSender(File confFile){
+        //TODO create the Engine Context
+    }
+    
     /**
      * Method send
      *

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java?view=diff&r1=160853&r2=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java Mon Apr 11 03:19:59 2005
@@ -1,3 +1,4 @@
+
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -12,97 +13,22 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ *  Runtime state of the engine
  */
 package org.apache.axis.engine;
 
-import java.util.ArrayList;
-import java.util.Stack;
-
-import javax.xml.namespace.QName;
-
 import org.apache.axis.context.MessageContext;
-import org.apache.axis.description.HandlerMetadata;
-import org.apache.axis.handlers.AbstractHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * <p>This is Phase, a orderd collection of Handlers.
- * seems this is Handler Chain with order.</p>
- * Should this exttends Hanlders?
- */
-public class Phase extends AbstractHandler implements Handler {
-    /**
-     * Field DISPATCH_PHASE
-     */
-    public static final String DISPATCH_PHASE = "DispatchPhase";
 
-    /**
-     * Field SERVICE_INVOCATION
-     */
-    public static final String SERVICE_INVOCATION = "ServiceInvocationPhase";
-
-    /**
-     * Field SENDING_PHASE
-     */
-    public static final String SENDING_PHASE = "SendPhase";
-
-    /**
-     * Field NAME
-     */
-    public static final QName NAME = new QName("http://axis.ws.apache.org",
-                    "Phase");
-
-    /**
-     * Field phaseName
-     */
-    private String phaseName;
-
-    /**
-     * Field handlers
-     */
-    private ArrayList handlers;
-
-    /**
-     * Field log
-     */
-    private Log log = LogFactory.getLog(getClass());
-    
-    private int indexOfHandlerToExecute = 0;
-
-    /**
-     * Constructor Phase
-     *
-     * @param phaseName
-     */
-    public Phase(String phaseName) {
-        handlers = new ArrayList();
-        this.phaseName = phaseName;
-        init(new HandlerMetadata(NAME));
-    }
-
-    /**
-     * Method addHandler
-     *
-     * @param handler
-     * @param index
-     */
-    public void addHandler(Handler handler, int index) {
-        log.info("Handler " + handler.getName() + "Added to place " + 1
-                        + " At the Phase " + phaseName);
-        handlers.add(index, handler);
-    }
+public interface Phase {
+    public void addHandler(Handler handler, int index);
 
     /**
      * add to next empty handler
      *
      * @param handler
      */
-    public void addHandler(Handler handler) {
-        log.info("Handler " + handler.getName() + " Added to the Phase "
-                        + phaseName);
-        handlers.add(handler);
-    }
+    public void addHandler(Handler handler);
 
     /**
      * If need to see how this works look at the stack!
@@ -110,65 +36,13 @@
      * @param msgctx
      * @throws AxisFault
      */
-    public void invoke(MessageContext msgctx) throws AxisFault {
-        Stack executionStack = new Stack();
-        try {
-            while (indexOfHandlerToExecute < handlers.size() ) {
-                if(msgctx.isPaused()){
-                    break;
-                }else{
-                    Handler handler = (Handler) handlers.get(indexOfHandlerToExecute);
-                    if (handler != null) {
-                        log.info("Invoke the Handler " + handler.getName()
-                                        + "with in the Phase " + phaseName);
-                        handler.invoke(msgctx);
-                        //This line should be after the invoke as if the invocation failed this handlers is takn care of and 
-                        //no need to revoke agien
-                        executionStack.push(handler);
-                        indexOfHandlerToExecute++;
-                    }
-                }
-            }
-        } catch (Exception e) {
-            log.info("Phase " + phaseName + " failed with the "
-                            + e.getMessage());
-            while (!executionStack.isEmpty()) {
-                Handler handler = (Handler) executionStack.pop();
-                log.info("revoke the Handler " + handler.getName()
-                                + " with in the Phase " + phaseName);
-                handler.revoke(msgctx);
-            }
-            throw AxisFault.makeFault(e);
-        }
-    }
-
-    /**
-     * Method revoke
-     *
-     * @param msgctx
-     */
-    public void revoke(MessageContext msgctx) {
-        for (int i = handlers.size() - 1; i > -1; i--) {
-            Handler handler = (Handler) handlers.get(i);
-            log.info("revoke the Handler " + handler.getName()
-                            + " with in the Phase " + phaseName);
-            if (handler != null) {
-                handler.revoke(msgctx);
-            }
-        }
-    }
-
-    /**
-     * @return Returns the name.
-     */
-    public String getPhaseName() {
-        return phaseName;
-    }
 
+    public String getPhaseName();
     /**
      * @param phaseName The name to set.
      */
-    public void setName(String phaseName) {
-        this.phaseName = phaseName;
-    }
-}
+    public void setName(String phaseName);
+    //   public void preCondition(MessageContext msgCtx)throws AxisFault;
+    public void invoke(MessageContext msgCtx) throws AxisFault;
+    //    public void postCondition(MessageContext msgCtx)throws AxisFault;
+}
\ No newline at end of file

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.context.OperationContext;
+import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.HandlerMetadata;
+import org.apache.axis.handlers.AbstractHandler;
+import org.apache.wsdl.WSDLService;
+
+
+
+import javax.xml.namespace.QName;
+
+/**
+ * Class Dispatcher
+ */
+public class RequestURIBasedDispatcher extends AbstractHandler implements Handler {
+    /**
+     * Field NAME
+     */
+    public static final QName NAME = new QName("http://axis.ws.apache.org", "RequestURIBasedDispatcher");
+    private AxisService service;
+
+    /**
+     * Constructor Dispatcher
+     */
+    public RequestURIBasedDispatcher() {
+        init(new HandlerMetadata(NAME));
+    }
+
+    /**
+     * Method invoke
+     *
+     * @param msgctx
+     * @throws AxisFault
+     */
+    public void invoke(MessageContext msgctx) throws AxisFault {
+        final String URI_ID_STRING = "/services";
+        if (msgctx.isServerSide()) {
+
+            EndpointReference toEPR = msgctx.getTo();
+            String filePart = toEPR.getAddress();
+
+            int index = filePart.lastIndexOf(URI_ID_STRING);
+            String serviceStr = null;
+            if (index > 0) {
+                serviceStr = filePart.substring(index + URI_ID_STRING.length() + 1);
+                EngineConfiguration registry = msgctx.getEngineContext().getEngineConfig();
+                QName serviceName = new QName(serviceStr);
+                service = registry.getService(serviceName);
+                ServiceContext serviceContext = new ServiceContext(service);
+                if (service != null) {
+                    msgctx.setServiceContext(serviceContext);
+                    msgctx.setMessageStyle(service.getStyle());
+                } else {
+                    throw new AxisFault("Service " + serviceName + " is not found");
+                }
+
+            } else {
+                throw new AxisFault("Both the URI and SOAP_ACTION are Null");
+            }
+
+            if (WSDLService.STYLE_DOC.equals(msgctx.getMessageStyle())) {
+                String soapAction = (String) msgctx.getProperty(MessageContext.SOAP_ACTION);
+                if (soapAction != null) {
+                    soapAction = soapAction.replace('"', ' ').trim();
+                }
+
+                if (soapAction != null && soapAction.trim().length() > 0) {
+                    QName operationName = new QName(soapAction);
+                    AxisOperation op = service.getOperation(operationName);
+                    if (op != null) {
+                        OperationContext opContext = new OperationContext(op);
+                        msgctx.setOperationContext(opContext);
+                    }
+                }
+            }
+        } else {
+            // TODO client side service Dispatch ,, What this really mean?
+        }
+    }
+}

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java?view=auto&rev=160854
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java Mon Apr 11 03:19:59 2005
@@ -0,0 +1,73 @@
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *  Runtime state of the engine
+ */
+package org.apache.axis.engine;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.axis.context.EngineContext;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.handlers.AbstractHandler;
+import org.apache.axis.modules.Module;
+
+public class ServiceHandlersChainBuilder extends AbstractHandler {
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.engine.Handler#invoke(org.apache.axis.context.MessageContext)
+     */
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        ServiceContext serviceContext = msgContext.getServiceContext();
+        if (serviceContext != null) {
+            // let add the Handlers
+            ExecutionChain chain = msgContext.getExecutionChain();
+            
+            EngineContext engineContext = msgContext.getEngineContext();
+            engineContext.addService(serviceContext);
+            
+            chain.addPhases(serviceContext.getPhases(EngineConfiguration.INFLOW));
+            
+            //TODO check had the modules changes after the deployment time handler 
+            //resolution and if that is the case recalculate the Handler Chain
+
+            //let the each module chain the execution chain if so wished
+            EngineConfiguration engConfig = engineContext.getEngineConfig();
+            AxisGlobal axisGlobal = engConfig.getGlobal();
+            Collection modules = axisGlobal.getModules();
+            AxisModule axisModule = null;
+            for(Iterator it = modules.iterator();it.hasNext();axisModule = (AxisModule)it.next()){
+                Module module = axisModule.getModule();
+                module.engage(chain);
+            }
+            
+            modules = serviceContext.getServiceConfig().getModules();
+            for(Iterator it = modules.iterator();it.hasNext();axisModule = (AxisModule)it.next()){
+                Module module = axisModule.getModule();
+                module.engage(chain);
+            }
+            
+        } else {
+            throw new AxisFault("Service " + serviceContext.getName() + " is not found");
+        }
+
+    }
+
+}



Mime
View raw message