axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r170335 - /webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver
Date Mon, 16 May 2005 08:25:56 GMT
Author: deepal
Date: Mon May 16 01:25:55 2005
New Revision: 170335

URL: http://svn.apache.org/viewcvs?rev=170335&view=rev
Log: (empty)

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/PhaseMetadata.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=170335&r1=170334&r2=170335&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
Mon May 16 01:25:55 2005
@@ -159,8 +159,6 @@
     public void buildTransportChain(PhasesInclude trnsport, int chainType)
             throws PhaseException {
         try {
-            //OrderThePhases();
-
             HandlerDescription[] handlers;
             Class handlerClass = null;
             Handler handler;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java?rev=170335&r1=170334&r2=170335&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseMetadata.java
Mon May 16 01:25:55 2005
@@ -41,6 +41,14 @@
     public static final String PHASE_MESSAGE_OUT = "MessageOut";
     public static final String PHASE_TRANSPORT_OUT = "MessageOut";
 
+
+    /**
+     * todo  I think thi shas to be change
+     * All the handlers inside transportsender and TranportRecievre in server.xml gose
+     * to this phase 
+     */
+    public static final String TRANSPORT_PHASE = "TRANSPORT";
+
     /**
      * Field BOTH_BEFORE_AFTER
      */

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=170335&r1=170334&r2=170335&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
Mon May 16 01:25:55 2005
@@ -20,6 +20,7 @@
 import org.apache.axis.engine.AxisConfiguration;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.AxisSystemImpl;
+import org.apache.axis.engine.Phase;
 import org.apache.axis.phaseresolver.util.PhaseValidator;
 
 import javax.xml.namespace.QName;
@@ -307,36 +308,33 @@
 
     private void buildINTransportChains(TransportInDescription transport)
             throws PhaseException {
-        //TODO Fix me
-        /*Flow flow = null;
+        Flow flow = null;
         for (int type = 1; type < 4; type++) {
-        phaseHolder = new PhaseHolder(axisConfig);
-        phaseHolder.setFlowType(type);
-        switch (type) {
-        case PhaseMetadata.IN_FLOW:
-        {
-        flow = transport.getInFlow();
-        break;
-        }
-        case PhaseMetadata.FAULT_IN_FLOW:
-        {
-        flow = transport.getFaultFlow();
-        break;
-        }
-        }
-        if (flow != null) {
-        for (int j = 0; j < flow.getHandlerCount(); j++) {
-        HandlerDescription metadata = flow.getHandler(j);
-
-        // todo change this in properway
-        if (metadata.getRules().getPhaseName().equals("")) {
-        throw new PhaseException("Phase dose not specified");
-        }
-        phaseHolder.addHandler(metadata);
-        }
+            switch (type) {
+                case PhaseMetadata.IN_FLOW:
+                    {
+                        flow = transport.getInFlow();
+                        break;
+                    }
+                case PhaseMetadata.FAULT_IN_FLOW:
+                    {
+                        flow = transport.getFaultFlow();
+                        break;
+                    }
+            }
+            if (flow != null) {
+                ArrayList phaseList = new ArrayList();
+                phaseList.add(new Phase(PhaseMetadata.TRANSPORT_PHASE));
+                phaseHolder = new PhaseHolder(phaseList);
+                for (int j = 0; j < flow.getHandlerCount(); j++) {
+                    HandlerDescription metadata = flow.getHandler(j);
+                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
+                    phaseHolder.addHandler(metadata);
+                    phaseHolder.addHandler(metadata);
+                }
+            }
+            phaseHolder.buildTransportChain(transport, type);
         }
-        phaseHolder.buildTransportChain(transport, type);
-        }*/
     }
 
 
@@ -348,36 +346,32 @@
      */
     private void buildOutTransportChains(TransportOutDescription transport)
             throws PhaseException {
-        //TODO fix me
-        /*Flow flow = null;
-        for (int type = 1; type < 4; type++) {
-        phaseHolder = new PhaseHolder(axisConfig);
-        phaseHolder.setFlowType(type);
-        switch (type) {
-        case PhaseMetadata.OUT_FLOW:
-        {
-        flow = transport.getOutFlow();
-        break;
-        }
-        case PhaseMetadata.FAULT_OUT_FLOW:
-        {
-        flow = transport.getFaultFlow();
-        break;
-        }
-        }
-        if (flow != null) {
-        for (int j = 0; j < flow.getHandlerCount(); j++) {
-        HandlerDescription metadata = flow.getHandler(j);
-
-        // todo change this in properway
-        if (metadata.getRules().getPhaseName().equals("")) {
-        throw new PhaseException("Phase dose not specified");
-        }
-        phaseHolder.addHandler(metadata);
-        }
+        Flow flow = null;
+        for (int type = 1; type < 5; type++) {
+            switch (type) {
+                case PhaseMetadata.OUT_FLOW:
+                    {
+                        flow = transport.getOutFlow();
+                        break;
+                    }
+                case PhaseMetadata.FAULT_OUT_FLOW:
+                    {
+                        flow = transport.getFaultFlow();
+                        break;
+                    }
+            }
+            if (flow != null) {
+                ArrayList phaseList = new ArrayList();
+                phaseList.add(new Phase(PhaseMetadata.TRANSPORT_PHASE));
+                phaseHolder = new PhaseHolder(phaseList);
+                for (int j = 0; j < flow.getHandlerCount(); j++) {
+                    HandlerDescription metadata = flow.getHandler(j);
+                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
+                    phaseHolder.addHandler(metadata);
+                }
+            }
+            phaseHolder.buildTransportChain(transport, type);
         }
-        phaseHolder.buildTransportChain(transport, type);
-        }*/
     }
 
     /**
@@ -418,46 +412,6 @@
                         break;
                     }
             }
-            //TODO NOTE : the following section commented since are not going to init all
the module
-            //if they are not refered by some one  (Deepal)
-            /*Collection col = ((AxisSystemImpl) axisConfig).getModules().values();
-            for (Iterator iterator = col.iterator(); iterator.hasNext();) {
-            ModuleDescription axismodule = (ModuleDescription) iterator.next();
-            switch (type) {
-            case PhaseMetadata.IN_FLOW:
-            {
-            flow = axismodule.getInFlow();
-            break;
-            }
-            case PhaseMetadata.OUT_FLOW:
-            {
-            flow = axismodule.getOutFlow();
-            break;
-            }
-            case PhaseMetadata.FAULT_IN_FLOW:
-            {
-            flow = axismodule.getFaultInFlow();
-            break;
-            }
-            case PhaseMetadata.FAULT_OUT_FLOW:
-            {
-            flow = axismodule.getFaultOutFlow();
-            break;
-            }
-            }
-            if (flow != null) {
-            for (int j = 0; j < flow.getHandlerCount(); j++) {
-            HandlerDescription metadata = flow.getHandler(j);
-
-            if(PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())){
-            phaseHolder.addHandler(metadata);
-            } else {
-            throw new PhaseException("Global module can not refer service specific phases
: "
-            + metadata.getRules().getPhaseName());
-            }
-            }
-            }
-            }*/
             ////////////////////////////////////////////////////////////////////////////////////
             /////////////////// Modules refered by server.xml //////////////////////////////////
             ////////////////////////////////////////////////////////////////////////////////////



Mime
View raw message