You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2005/05/12 15:33:27 UTC

svn commit: r169817 - in /webservices/axis/trunk/java/modules/core: src/org/apache/axis/deployment/DeploymentEngine.java src/org/apache/axis/deployment/DeploymentParser.java src/org/apache/axis/phaseresolver/PhaseResolver.java test/org/apache/axis/deployment/TransportDeploymentTest.java

Author: deepal
Date: Thu May 12 06:33:26 2005
New Revision: 169817

URL: http://svn.apache.org/viewcvs?rev=169817&view=rev
Log:
error corection

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java

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?rev=169817&r1=169816&r2=169817&view=diff
==============================================================================
--- 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 Thu May 12 06:33:26 2005
@@ -37,6 +37,7 @@
 import org.apache.axis.deployment.scheduler.DeploymentIterator;
 import org.apache.axis.deployment.scheduler.Scheduler;
 import org.apache.axis.deployment.scheduler.SchedulerTask;
+import org.apache.axis.deployment.util.DeploymentTempData;
 import org.apache.axis.description.GlobalDescription;
 import org.apache.axis.description.ModuleDescription;
 import org.apache.axis.description.ServiceDescription;
@@ -77,7 +78,7 @@
      * this ref will pass to engine when it call start()
      * method
      */
-    private AxisConfiguration engineconfig;
+    private AxisConfiguration axisConfig;
 
     /**
      * this constaructor for the testing
@@ -160,8 +161,8 @@
      *
      * @return
      */
-    public AxisConfiguration getEngineconfig() {
-        return engineconfig;
+    public AxisConfiguration getAxisConfig() {
+        return axisConfig;
     }
 
     /**
@@ -191,7 +192,7 @@
         File tempfile = new File(engineConfigName);
         try {
             InputStream in = new FileInputStream(tempfile);
-            engineconfig = createEngineConfig();
+            axisConfig = createEngineConfig();
             DeploymentParser parser = new DeploymentParser(in, this);
             parser.processGlobalConfig(axisGlobal);
         } catch (FileNotFoundException e) {
@@ -211,7 +212,7 @@
             log.info("Module validation failed" + axisFault.getMessage());
             throw new DeploymentException(axisFault.getMessage());
         }
-        return engineconfig;
+        return axisConfig;
     }
 
 
@@ -222,7 +223,7 @@
         File tempfile = new File(engineConfigName);
         try {
             InputStream in = new FileInputStream(tempfile);
-            engineconfig = createEngineConfig();
+            axisConfig = createEngineConfig();
             DeploymentParser parser = new DeploymentParser(in, this);
             parser.processGlobalConfig(axisGlobal);
         } catch (FileNotFoundException e) {
@@ -239,7 +240,7 @@
             log.info("Module validation failed" + axisFault.getMessage());
             throw new DeploymentException(axisFault.getMessage());
         }
-        return engineconfig;
+        return axisConfig;
     }
 
     /**
@@ -256,8 +257,14 @@
         }
     }
 
+    private void validateSystemPredefinedPhases(){
+        DeploymentTempData tempdata = DeploymentTempData.getInstance();
+        ArrayList inPhases = tempdata.getINPhases();
+        
+    }
+
     public ModuleDescription getModule(QName moduleName) throws AxisFault {
-        ModuleDescription axisModule = engineconfig.getModule(moduleName);
+        ModuleDescription axisModule = axisConfig.getModule(moduleName);
         return axisModule;
     }
 
@@ -281,8 +288,8 @@
         try {
             currentFileItem.setClassLoader();
             loadServiceProperties(serviceMetaData);
-            engineconfig.addService(serviceMetaData);
-            factory.createChains(serviceMetaData, engineconfig);
+            axisConfig.addService(serviceMetaData);
+            factory.createChains(serviceMetaData, axisConfig);
             System.out.println("adding new service : " + serviceMetaData.getName().getLocalPart());
         } catch (PhaseException e) {
             throw new AxisFault(e);
@@ -386,7 +393,7 @@
         Flow faultOutFlow = moduelmetada.getFaultOutFlow();
         addFlowHandlers(faultOutFlow);
         loadModuleClass(moduelmetada);
-        engineconfig.addMdoule(moduelmetada);
+        axisConfig.addMdoule(moduelmetada);
     }
 
 
@@ -436,7 +443,7 @@
                             e.printStackTrace();
                         } finally {
                             if (serviceStatus.startsWith("Error:")) {
-                                engineconfig.getFaulytServices().put(getAxisServiceName(currentFileItem.getName()), serviceStatus);
+                                axisConfig.getFaulytServices().put(getAxisServiceName(currentFileItem.getName()), serviceStatus);
                             }
                             currentFileItem = null;
                         }
@@ -473,10 +480,10 @@
                     WSInfo wsInfo = (WSInfo) wsToUnDeploy.get(i);
                     if (wsInfo.getType() == SERVICE) {
                         serviceName = getAxisServiceName(wsInfo.getFilename());
-                        engineconfig.removeService(new QName(serviceName));
+                        axisConfig.removeService(new QName(serviceName));
                         log.info("UnDeployement WS Name  " + wsInfo.getFilename());
                     }
-                    engineconfig.getFaulytServices().remove(serviceName);
+                    axisConfig.getFaulytServices().remove(serviceName);
                 }
 
             }
@@ -546,7 +553,7 @@
             schme.parseServiceXML(axisService);
             axisService.setClassLoader(classLoader);
             loadServiceProperties(axisService);
-            engineconfig.addService(axisService);
+            axisConfig.addService(axisService);
 
         } catch (XMLStreamException e) {
             throw new DeploymentException("XMLStreamException" + e.getMessage());

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java?rev=169817&r1=169816&r2=169817&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java Thu May 12 06:33:26 2005
@@ -42,6 +42,7 @@
 import org.apache.axis.phaseresolver.PhaseMetadata;
 import org.apache.axis.transport.TransportReceiver;
 import org.apache.axis.transport.TransportSender;
+import org.apache.axis.deployment.util.DeploymentTempData;
 
 
 /**
@@ -120,10 +121,10 @@
                         axisGlobal.addParameter(parameter);
                     } else if (TRANSPORTSENDER.equals(ST)) {
                         TransportOutDescription transportout = proccessTrasnsportOUT();
-                        dpengine.getEngineconfig().addTransportOut(transportout);
+                        dpengine.getAxisConfig().addTransportOut(transportout);
                     } else if (TRANSPORTRECEIVER.equals(ST)) {
                         TransportInDescription transportin = proccessTrasnsportIN();
-                        dpengine.getEngineconfig().addTransportIn(transportin);
+                        dpengine.getAxisConfig().addTransportIn(transportin);
                     } else if (TYPEMAPPINGST.equals(ST)) {
                         throw new UnsupportedOperationException("Type Mappings are not allowed in server.xml");
                     } else if (MESSAGERECEIVER.equals(ST)) {
@@ -170,19 +171,20 @@
                         }
                     } else if (PHASE_ORDER.equals(ST)) {
                         int attribCount = pullparser.getAttributeCount();
+                        DeploymentTempData tempdata = DeploymentTempData.getInstance();
                         if (attribCount > 0) {
                             for (int i = 0; i < attribCount; i++) {
                                 String attname = pullparser.getAttributeLocalName(i);
                                 String attvalue = pullparser.getAttributeValue(i);
                                 if (TYPE.equals(attname)) {
                                     if (INFLOWST.equals(attvalue)) {
-                                        ((AxisSystemImpl) dpengine.getEngineconfig()).setInPhases(processPhaseOrder());
+                                        tempdata.setINPhases(processPhaseOrder());
                                     } else if (OUTFLOWST.equals(attvalue)) {
-                                        ((AxisSystemImpl) dpengine.getEngineconfig()).setOutPhases(processPhaseOrder());
+                                        tempdata.setOUTPhases(processPhaseOrder());
                                     } else if (IN_FAILTFLOW.equals(attvalue)) {
-                                        ((AxisSystemImpl) dpengine.getEngineconfig()).setInFaultPhases(processPhaseOrder());
+                                        tempdata.setIN_FaultPhases(processPhaseOrder());
                                     } else if (OUT_FAILTFLOW.equals(attvalue)) {
-                                        ((AxisSystemImpl) dpengine.getEngineconfig()).setOutFaultPhases(processPhaseOrder());
+                                        tempdata.setOUT_FaultPhases(processPhaseOrder());
                                     } else {
                                         throw new DeploymentException("un defined flow type  " + ST);
                                     }
@@ -963,11 +965,12 @@
                         String attname = pullparser.getAttributeLocalName(0);
                         String attvalue = pullparser.getAttributeValue(0);
                         if (ATTNAME.equals(attname)) {
-                            if (attvalue.equals(PhaseMetadata.PRE_DISPATCH)) {
-                                throw new DeploymentException(attvalue + " is a reserved phase");
-                            } else {
-                                pahseList.add(attvalue);
-                            }
+                            //TODO fix me
+//                            if (attvalue.equals(PhaseMetadata.PRE_DISPATCH)) {
+//                                throw new DeploymentException(attvalue + " is a reserved phase");
+//                            } else {
+//                                pahseList.add(attvalue);
+//                            }
                         }
                     } else {
                         throw new DeploymentException("parser Exception : un supported element" + tagnae);

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=169817&r1=169816&r2=169817&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 Thu May 12 06:33:26 2005
@@ -125,9 +125,10 @@
                  * If the phase property of a handler is pre-dispatch then those handlers
                  * should go to the global chain , to the pre-dispatch phase
                  */
-                if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
-                    continue;
-                }
+                //TODO fix me
+//                if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
+//                    continue;
+//                }
                 if (metadata.getRules().getPhaseName().equals("")) {
                     throw new PhaseException("Phase dose not specified");
                 }
@@ -371,11 +372,12 @@
                          * If the phase property of a handler is pre-dispatch then those handlers
                          * should go to the global chain , to the pre-dispatch phase
                          */
-                        if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
-                            phaseHolder.addHandler(metadata);
-                        } else {
-                            continue;
-                        }
+                        //TODO fix me
+//                        if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
+//                            phaseHolder.addHandler(metadata);
+//                        } else {
+//                            continue;
+//                        }
                     }
                 }
             }
@@ -408,11 +410,12 @@
                 if (flow != null) {
                     for (int j = 0; j < flow.getHandlerCount(); j++) {
                         HandlerDescription metadata = flow.getHandler(j);
-                        if (!PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
-                            phaseHolder.addHandler(metadata);
-                        } else {
-                            continue;
-                        }
+                        //TODO fix me
+//                        if (!PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
+//                            phaseHolder.addHandler(metadata);
+//                        } else {
+//                            continue;
+//                        }
                     }
                 }
             }

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java?rev=169817&r1=169816&r2=169817&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/TransportDeploymentTest.java Thu May 12 06:33:26 2005
@@ -37,7 +37,7 @@
     public void testTransports() throws AxisFault, PhaseException, DeploymentException, XMLStreamException {
         DeploymentEngine engine = new DeploymentEngine(testResourceDir + "/deployment", "server-transport.xml");
         engine.load();
-        AxisConfiguration er = engine.getEngineconfig();
+        AxisConfiguration er = engine.getAxisConfig();
         TransportInDescription transport = er.getTransportIn(new QName("http"));
         assertNotNull(transport);
         assertNotNull(transport.getInFlow());