axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r168110 - /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
Date Wed, 04 May 2005 10:23:59 GMT
Author: deepal
Date: Wed May  4 03:23:57 2005
New Revision: 168110

URL: http://svn.apache.org/viewcvs?rev=168110&view=rev
Log:
to resolve pre-dispatch phase 

Modified:
    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

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java?rev=168110&r1=168109&r2=168110&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
Wed May  4 03:23:57 2005
@@ -121,13 +121,17 @@
             PhaseMetadata pm = new PhaseMetadata(name);
             inPhases.add(pm);
         }
+        inPhases.add(0,PhaseMetadata.PRE_DISPATCH);
         tempPhases = registry.getOutPhases();
         for (int i = 0; i < tempPhases.size(); i++) {
             String name = (String) tempPhases.get(i);
             PhaseMetadata pm = new PhaseMetadata(name);
             outPhases.add(pm);
         }
+        outPhases.add(PhaseMetadata.PRE_DISPATCH);
+
         tempPhases = registry.getInFaultPhases();
+        faultInPhases.add(0,PhaseMetadata.PRE_DISPATCH);
         for (int i = 0; i < tempPhases.size(); i++) {
             String name = (String) tempPhases.get(i);
             PhaseMetadata pm = new PhaseMetadata(name);
@@ -139,6 +143,7 @@
             PhaseMetadata pm = new PhaseMetadata(name);
             faultOutPhases.add(pm);
         }
+        faultOutPhases.add(PhaseMetadata.PRE_DISPATCH);
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java?rev=168110&r1=168109&r2=168110&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
Wed May  4 03:23:57 2005
@@ -34,6 +34,7 @@
 import org.apache.axis.description.HandlerMetadata;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineConfiguration;
+import org.apache.axis.engine.EngineConfigurationImpl;
 
 /**
  * Class PhaseResolver
@@ -362,9 +363,10 @@
         for (int type = 1; type < 4; type++) {
             phaseHolder = new PhaseHolder(engineConfig);
             phaseHolder.setFlowType(type);
-            for (int intA = 0; intA < count; intA++) {
-                moduleName = (QName) modules.get(intA);
-                module = engineConfig.getModule(moduleName);
+            List globalModule = (List)((EngineConfigurationImpl)engineConfig).getModules().values();
+            int gcount =  globalModule.size();
+            for (int intA = 0; intA < gcount; intA++) {
+                module = (AxisModule) globalModule.get(intA);
                 switch (type) {
                     case PhaseMetadata.IN_FLOW:
                         {
@@ -395,6 +397,43 @@
                          * should go to the global chain , to the pre-dispatch phase
                          */
                         if(PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())){
+                            phaseHolder.addHandler(metadata);
+                        }  else {
+                            continue;
+                        }
+                    }
+                }
+            }
+            ///////////////////////////////////////////////////
+            for (int intA = 0; intA < count; intA++) {
+                moduleName = (QName) modules.get(intA);
+                module = engineConfig.getModule(moduleName);
+                switch (type) {
+                    case PhaseMetadata.IN_FLOW:
+                        {
+                            flow = module.getInFlow();
+                            break;
+                        }
+                    case PhaseMetadata.OUT_FLOW:
+                        {
+                            flow = module.getOutFlow();
+                            break;
+                        }
+                    case PhaseMetadata.FAULT_IN_FLOW:
+                        {
+                            flow = module.getFaultInFlow();
+                            break;
+                        }
+                    case PhaseMetadata.FAULT_OUT_FLOW:
+                        {
+                            flow = module.getFaultOutFlow();
+                            break;
+                        }
+                }
+                if (flow != null) {
+                    for (int j = 0; j < flow.getHandlerCount(); j++) {
+                        HandlerMetadata metadata = flow.getHandler(j);
+                        if(! PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())){
                             phaseHolder.addHandler(metadata);
                         }  else {
                             continue;



Mime
View raw message