ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r381997 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/deployment/util/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/ core/src/org/apache/axis2/phaseres...
Date Wed, 01 Mar 2006 11:58:17 GMT
Author: deepal
Date: Wed Mar  1 03:58:16 2006
New Revision: 381997

URL: http://svn.apache.org/viewcvs?rev=381997&view=rev
Log:
- fixed few bugs (removed default chains from AxisConfiguration)
- Fault chains creation

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java

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=381997&r1=381996&r2=381997&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
Wed Mar  1 03:58:16 2006
@@ -613,6 +613,7 @@
         axisConfig.setInPhasesUptoAndIncludingPostDispatch(phasesinfo.getGlobalInflow());
         axisConfig.setInFaultPhases(phasesinfo.getIN_FaultPhases());
         axisConfig.setGlobalOutPhase(phasesinfo.getGlobalOutPhaseList());
+        axisConfig.setOutFaultPhases(phasesinfo.getOUT_FaultPhases());
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
Wed Mar  1 03:58:16 2006
@@ -111,7 +111,6 @@
     }
 
     public ArrayList getGlobalOutPhaseList() throws DeploymentException {
-
         /**
          * I have assumed that     PolicyDetermination and  MessageProcessing are global
out phase
          */
@@ -142,8 +141,18 @@
         return OUTPhases;
     }
 
-    public ArrayList getOUT_FaultPhases() {
-        return OUT_FaultPhases;
+    public ArrayList getOUT_FaultPhases() throws DeploymentException {
+        ArrayList globalPhaseList = new ArrayList();
+        for (int i = 0; i < OUT_FaultPhases.size(); i++) {
+            Phase phase = (Phase) OUT_FaultPhases.get(i);
+            String phaseName = phase.getPhaseName();
+
+            if (PhaseMetadata.PHASE_POLICY_DETERMINATION.equals(phaseName)
+                    || PhaseMetadata.PHASE_MESSAGE_OUT.equals(phaseName)) {
+                globalPhaseList.add(copyPhase(phase));
+            }
+        }
+        return globalPhaseList;
     }
 
     public ArrayList getOperationInFaultPhases() throws DeploymentException {
@@ -179,13 +188,15 @@
 
     public ArrayList getOperationOutFaultPhases() throws DeploymentException {
         ArrayList oprationOUT_FaultPhases = new ArrayList();
-
         for (int i = 0; i < OUT_FaultPhases.size(); i++) {
             Phase phase = (Phase) OUT_FaultPhases.get(i);
-
-            oprationOUT_FaultPhases.add(copyPhase(phase));
+            String phaseName = phase.getPhaseName();
+            if (PhaseMetadata.PHASE_POLICY_DETERMINATION.equals(phaseName)
+                    || PhaseMetadata.PHASE_MESSAGE_OUT.equals(phaseName)) {
+            } else {
+                oprationOUT_FaultPhases.add(copyPhase(phase));
+            }
         }
-
         return oprationOUT_FaultPhases;
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
Wed Mar  1 03:58:16 2006
@@ -271,18 +271,14 @@
                 if (resenvelope.getBody().hasFault()) {
                     SOAPFault soapFault = resenvelope.getBody().getFault();
                     Exception ex = soapFault.getException();
-
                     if (options.isExceptionToBeThrownOnSOAPFault()) {
-
                         // does the SOAPFault has a detail element for Excpetion
                         if (ex != null) {
                             throw new AxisFault(ex);
                         } else {
-
                             // if detail element not present create a new
                             // Exception from the detail
                             String message = "";
-
                             message = (message + "Code =" + soapFault.getCode() == null)
? ""
                                     : (soapFault.getCode().getValue() == null) ? ""
                                     : soapFault.getCode().getValue()
@@ -361,7 +357,7 @@
             responseMessageContext.setEnvelope(resenvelope);
             engine = new AxisEngine(msgctx.getConfigurationContext());
             engine.receive(responseMessageContext);
-            if (!resenvelope.getBody().hasFault()) {
+            if (responseMessageContext.getReplyTo() != null) {
                 sc.setTargetEPR(responseMessageContext.getReplyTo());
             }
         } else {

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=381997&r1=381996&r2=381997&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
Wed Mar  1 03:58:16 2006
@@ -23,17 +23,7 @@
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
 import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.AxisDescription;
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
-import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
+import org.apache.axis2.description.*;
 import org.apache.axis2.util.HostConfiguration;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
@@ -41,12 +31,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 AxisConfigurationImpl
@@ -112,20 +97,10 @@
         faultyModules = new Hashtable();
         observersList = new ArrayList();
         inPhasesUptoAndIncludingPostDispatch = new ArrayList();
-
         systemClassLoader = Thread.currentThread().getContextClassLoader();
         serviceClassLoader = Thread.currentThread().getContextClassLoader();
         moduleClassLoader = Thread.currentThread().getContextClassLoader();
-
         this.phasesinfo = new PhasesInfo();
-
-        // setting the default flow , if some one creating AxisConfig programatically
-        // most required handles will be there in the flow.
-
-        // todo we need to fix this , we know that we are doing wrong thing here
-        createDefaultChain();
-        //setting default message receivers
-        addDefaultMessageReceivers();
     }
 
     public void addMessageReceiver(String mepURL, MessageReceiver messageReceiver) {
@@ -133,15 +108,6 @@
     }
 
     /**
-     * This is required if we are going to create AxisConfiguration programatically
-     * in that case , no dafault message recivers will there be in the system
-     */
-    private void addDefaultMessageReceivers() {
-        addMessageReceiver("http://www.w3.org/2004/08/wsdl/in-only", new RawXMLINOnlyMessageReceiver());
-        addMessageReceiver("http://www.w3.org/2004/08/wsdl/in-out", new RawXMLINOutMessageReceiver());
-    }
-
-    /**
      * Method addModule.
      *
      * @param module
@@ -253,42 +219,6 @@
      */
     public void addTransportOut(TransportOutDescription transport) throws AxisFault {
         transportsOut.put(transport.getName(), transport);
-    }
-
-    private void createDefaultChain() {
-        Phase transportIN = new Phase("TransportIn");
-        Phase preDispatch = new Phase("PreDispatch");
-        DispatchPhase dispatchPhase = new DispatchPhase();
-
-        dispatchPhase.setName("Dispatch");
-
-        AddressingBasedDispatcher abd = new AddressingBasedDispatcher();
-
-        abd.initDispatcher();
-
-        RequestURIBasedDispatcher rud = new RequestURIBasedDispatcher();
-
-        rud.initDispatcher();
-
-        SOAPActionBasedDispatcher sabd = new SOAPActionBasedDispatcher();
-
-        sabd.initDispatcher();
-
-        SOAPMessageBodyBasedDispatcher smbd = new SOAPMessageBodyBasedDispatcher();
-
-        smbd.initDispatcher();
-
-        InstanceDispatcher id = new InstanceDispatcher();
-
-        id.init(new HandlerDescription(new QName("InstanceDispatcher")));
-        dispatchPhase.addHandler(abd);
-        dispatchPhase.addHandler(rud);
-        dispatchPhase.addHandler(sabd);
-        dispatchPhase.addHandler(smbd);
-        dispatchPhase.addHandler(id);
-        inPhasesUptoAndIncludingPostDispatch.add(transportIN);
-        inPhasesUptoAndIncludingPostDispatch.add(preDispatch);
-        inPhasesUptoAndIncludingPostDispatch.add(dispatchPhase);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
Wed Mar  1 03:58:16 2006
@@ -17,12 +17,7 @@
 
 package org.apache.axis2.phaseresolver;
 
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Phase;
 
@@ -247,8 +242,21 @@
                 }
 
                 case PhaseMetadata.FAULT_OUT_FLOW : {
-                    phaseHolder = new PhaseHolder(axisOperation.getPhasesOutFaultFlow());
+                    ArrayList phases = new ArrayList();
+                    Iterator itr_ops = axisOperation.getPhasesOutFaultFlow().iterator();
+                    while (itr_ops.hasNext()) {
+                        Object o = itr_ops.next();
 
+                        phases.add(o);
+                    }
+                    if (axisConfig != null) {
+                        Iterator itr_axis_config = axisConfig.getOutFaultFlow().iterator();
+                        while (itr_axis_config.hasNext()) {
+                            Object o = itr_axis_config.next();
+                            phases.add(o);
+                        }
+                    }
+                    phaseHolder = new PhaseHolder(phases);
                     break;
                 }
             }

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
(original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
Wed Mar  1 03:58:16 2006
@@ -18,15 +18,12 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
+import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.InOutAxisOperation;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
 import org.apache.ws.commons.om.OMAbstractFactory;
@@ -61,7 +58,40 @@
 
         AxisService service = new AxisService(serviceName.getLocalPart());
         configConetxt.getAxisConfiguration().addService(service);
+        configConetxt.getAxisConfiguration().addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-only", new RawXMLINOnlyMessageReceiver());
+        configConetxt.getAxisConfiguration().addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-out", new RawXMLINOutMessageReceiver());
 
+        DispatchPhase dispatchPhase = new DispatchPhase();
+
+        dispatchPhase.setName("Dispatch");
+
+        AddressingBasedDispatcher abd = new AddressingBasedDispatcher();
+
+        abd.initDispatcher();
+
+        RequestURIBasedDispatcher rud = new RequestURIBasedDispatcher();
+
+        rud.initDispatcher();
+
+        SOAPActionBasedDispatcher sabd = new SOAPActionBasedDispatcher();
+
+        sabd.initDispatcher();
+
+        SOAPMessageBodyBasedDispatcher smbd = new SOAPMessageBodyBasedDispatcher();
+
+        smbd.initDispatcher();
+
+        InstanceDispatcher id = new InstanceDispatcher();
+
+        id.init(new HandlerDescription(new QName("InstanceDispatcher")));
+        dispatchPhase.addHandler(abd);
+        dispatchPhase.addHandler(rud);
+        dispatchPhase.addHandler(sabd);
+        dispatchPhase.addHandler(smbd);
+        dispatchPhase.addHandler(id);
+        configConetxt.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
         AxisOperation axisOp = new InOutAxisOperation(operationName);
         axisOp.setMessageReceiver(new MessageReceiver() {
             public void receive(MessageContext messageCtx) {
@@ -149,7 +179,7 @@
 
     public class TempHandler extends AbstractHandler {
         private static final long serialVersionUID = 6201231320871883424L;
-		private Integer index;
+        private Integer index;
         private boolean pause = false;
 
         public TempHandler(int index, boolean pause) {

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
(original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
Wed Mar  1 03:58:16 2006
@@ -4,7 +4,9 @@
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.PhaseRule;
 import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.DispatchPhase;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.Phase;
 import org.apache.axis2.phaseresolver.PhaseHolder;
 
 import javax.xml.namespace.QName;
@@ -19,12 +21,21 @@
         super(testName);
     }
 
+
     public void testPhaseRules() throws Exception {
         super.setUp();
         //TODO fix me
         phaserul = new PhaseRuleTest("");
         axisSytem = new AxisConfiguration();
         ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
+        Phase transportIN = new Phase("TransportIn");
+        Phase preDispatch = new Phase("PreDispatch");
+        DispatchPhase dispatchPhase = new DispatchPhase();
+//
+        dispatchPhase.setName("Dispatch");
+        inPhase.add(transportIN);
+        inPhase.add(preDispatch);
+        inPhase.add(dispatchPhase);
 
         PhaseHolder ph = new PhaseHolder(inPhase);
 
@@ -75,7 +86,6 @@
         rule3.setPhaseName("Dispatch");
         hm3.setRules(rule3);
         ph.addHandler(hm3);
-
 
         /*ArrayList oh = ph.getOrderHandler();
         for (int i = 0; i < oh.size(); i++) {

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
(original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
Wed Mar  1 03:58:16 2006
@@ -20,7 +20,9 @@
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.PhaseRule;
 import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.DispatchPhase;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.Phase;
 import org.apache.axis2.phaseresolver.PhaseHolder;
 
 import javax.xml.namespace.QName;
@@ -40,7 +42,14 @@
         phaserul = new PreDispatchPhaseRuleTest("");
         axisSytem = new AxisConfiguration();
         ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
-
+        Phase transportIN = new Phase("TransportIn");
+        Phase preDispatch = new Phase("PreDispatch");
+        DispatchPhase dispatchPhase = new DispatchPhase();
+//
+        dispatchPhase.setName("Dispatch");
+        inPhase.add(transportIN);
+        inPhase.add(preDispatch);
+        inPhase.add(dispatchPhase);
         PhaseHolder ph = new PhaseHolder(inPhase);
 
 
@@ -103,7 +112,6 @@
         rule2.setBefore("pre-H3");
         hm2.setRules(rule2);
         ph.addHandler(hm2);
-
 
         /*ArrayList oh = ph.getOrderHandler();
         for (int i = 0; i < oh.size(); i++) {

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
Wed Mar  1 03:58:16 2006
@@ -22,15 +22,11 @@
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.InOnlyAxisOperation;
-import org.apache.axis2.description.ParameterImpl;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.util.TestConstants;
 import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
+import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.transport.local.LocalTransportReceiver;
 import org.apache.axis2.transport.local.LocalTransportSender;
 import org.apache.ws.commons.om.OMAbstractFactory;
@@ -55,6 +51,40 @@
     protected void setUp() throws Exception {
         AxisConfiguration config = new AxisConfiguration();
 
+        config.addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-only", new RawXMLINOnlyMessageReceiver());
+        config.addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-out", new RawXMLINOutMessageReceiver());
+
+        DispatchPhase dispatchPhase = new DispatchPhase();
+
+        dispatchPhase.setName("Dispatch");
+
+        AddressingBasedDispatcher abd = new AddressingBasedDispatcher();
+
+        abd.initDispatcher();
+
+        RequestURIBasedDispatcher rud = new RequestURIBasedDispatcher();
+
+        rud.initDispatcher();
+
+        SOAPActionBasedDispatcher sabd = new SOAPActionBasedDispatcher();
+
+        sabd.initDispatcher();
+
+        SOAPMessageBodyBasedDispatcher smbd = new SOAPMessageBodyBasedDispatcher();
+
+        smbd.initDispatcher();
+
+        InstanceDispatcher id = new InstanceDispatcher();
+
+        id.init(new HandlerDescription(new QName("InstanceDispatcher")));
+        dispatchPhase.addHandler(abd);
+        dispatchPhase.addHandler(rud);
+        dispatchPhase.addHandler(sabd);
+        dispatchPhase.addHandler(smbd);
+        dispatchPhase.addHandler(id);
+        config.getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
         TransportInDescription tIn = new TransportInDescription(new QName(Constants.TRANSPORT_LOCAL));
         config.addTransportIn(tIn);
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java?rev=381997&r1=381996&r2=381997&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
Wed Mar  1 03:58:16 2006
@@ -19,12 +19,11 @@
 //todo
 
 import junit.framework.TestCase;
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.OutInAxisOperation;
+import org.apache.axis2.description.*;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.util.Utils;
+import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
+import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -41,7 +40,7 @@
     private QName operationName =
             new QName("http://ws.apache.org/axis2", "echoVoid");
 
-    private AxisConfiguration engineRegistry;
+    private AxisConfiguration config;
     private ClassLoader cl;
 
     public MessageWithServerTest(String testName) {
@@ -61,8 +60,42 @@
                 new QName("", "A Mdoule 1"));
         m1.setInFlow(new MockFlow("service module inflow", 4));
         //m1.setFaultInFlow(new MockFlow("service module faultflow", 1));
-        engineRegistry = new AxisConfiguration();
-        service.engageModule(m1, engineRegistry);
+        config = new AxisConfiguration();
+        config.addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-only", new RawXMLINOnlyMessageReceiver());
+        config.addMessageReceiver(
+                "http://www.w3.org/2004/08/wsdl/in-out", new RawXMLINOutMessageReceiver());
+
+        DispatchPhase dispatchPhase = new DispatchPhase();
+
+        dispatchPhase.setName("Dispatch");
+
+        AddressingBasedDispatcher abd = new AddressingBasedDispatcher();
+
+        abd.initDispatcher();
+
+        RequestURIBasedDispatcher rud = new RequestURIBasedDispatcher();
+
+        rud.initDispatcher();
+
+        SOAPActionBasedDispatcher sabd = new SOAPActionBasedDispatcher();
+
+        sabd.initDispatcher();
+
+        SOAPMessageBodyBasedDispatcher smbd = new SOAPMessageBodyBasedDispatcher();
+
+        smbd.initDispatcher();
+
+        InstanceDispatcher id = new InstanceDispatcher();
+
+        id.init(new HandlerDescription(new QName("InstanceDispatcher")));
+        dispatchPhase.addHandler(abd);
+        dispatchPhase.addHandler(rud);
+        dispatchPhase.addHandler(sabd);
+        dispatchPhase.addHandler(smbd);
+        dispatchPhase.addHandler(id);
+        config.getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
+        service.engageModule(m1, config);
 
         AxisOperation axisOperation = new OutInAxisOperation(
         );



Mime
View raw message