axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinath Perera <hemap...@gmail.com>
Subject Re: svn commit: r169923 - in /webservices/axis/trunk/java/modules/core: ./ samples/deployment/module1/org/apache/module/ src/org/apache/axis/deployment/ src/org/apache/axis/deployment/listener/ src/org/apache/axis/deployment/repository/utill/ src/org
Date Fri, 13 May 2005 04:30:45 GMT
The Build do not compile after last commit .. I am compell to wait on it 
Please check
Srinath

On 5/13/05, deepal@apache.org <deepal@apache.org> wrote:
> Author: deepal
> Date: Thu May 12 19:59:25 2005
> New Revision: 169923
> 
> URL: http://svn.apache.org/viewcvs?rev=169923&view=rev
> Log:
> Deployment refactoring , phase rules resolving
> 
> Added:
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentData.java
> Removed:
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/HDFileItem.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentTempData.java
> Modified:
>     webservices/axis/trunk/java/modules/core/maven.xml
>     webservices/axis/trunk/java/modules/core/samples/deployment/module1/org/apache/module/Module1Impl.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/DeploymentParser.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/ArchiveReader.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/WSInfoList.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/scheduler/SchedulerTask.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/server.xml
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.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/PhaseMetadata.java
>     webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
>     webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java
>     webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java
>     webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java
> 
> Modified: webservices/axis/trunk/java/modules/core/maven.xml
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/maven.xml?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/maven.xml (original)
> +++ webservices/axis/trunk/java/modules/core/maven.xml Thu May 12 19:59:25 2005
> @@ -13,7 +13,7 @@
>                 <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/deployment/service2"/>
>          <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/deployment/OutService"/>
>                 <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/deployment/module1"/>
> -               <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/deployment/module2"/>
> +       <!--    <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="samples/deployment/module2"/> -->
>         </j:jelly>
>        <ant:copy file="${basedir}/test-resources/deployment/server.xml" tofile="${basedir}/target/test-resources/deployment/server.xml"/>
>      </postGoal>
> 
> Modified: webservices/axis/trunk/java/modules/core/samples/deployment/module1/org/apache/module/Module1Impl.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/samples/deployment/module1/org/apache/module/Module1Impl.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/samples/deployment/module1/org/apache/module/Module1Impl.java (original)
> +++ webservices/axis/trunk/java/modules/core/samples/deployment/module1/org/apache/module/Module1Impl.java Thu May 12 19:59:25 2005
> @@ -1,10 +1,8 @@
>  package org.apache.module;
> 
>  import org.apache.axis.modules.Module;
> -import org.apache.axis.context.SystemContext;
>  import org.apache.axis.engine.AxisFault;
> -import org.apache.axis.engine.ExecutionChain;
> -import org.apache.axis.engine.AxisSystem;
> +import org.apache.axis.engine.AxisConfiguration;
> 
>  /**
>   * Created by IntelliJ IDEA.
> @@ -14,15 +12,14 @@
>   */
>  public class Module1Impl implements Module{
> 
> +
>      // initialize the module
> -    public void init(AxisSystem axisSystem) throws AxisFault {
> -        /**
> -         * in this case in the init the module does not need to do any thing
> -         */
> +    public void init(AxisConfiguration axisSystem) throws AxisFault {
> +        //To change body of implemented methods use File | Settings | File Templates.
>      }
> 
>      // shutdown the module
> -    public void shutdown(AxisSystem axisSystem) throws AxisFault {
> +    public void shutdown(AxisConfiguration axisSystem) throws AxisFault {
>          //To change body of implemented methods use File | Settings | File Templates.
>      }
>  }
> 
> 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=169923&r1=169922&r2=169923&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 19:59:25 2005
> @@ -16,34 +16,16 @@
> 
>  package org.apache.axis.deployment;
> 
> -import java.io.File;
> -import java.io.FileInputStream;
> -import java.io.FileNotFoundException;
> -import java.io.FileOutputStream;
> -import java.io.IOException;
> -import java.io.InputStream;
> -import java.util.ArrayList;
> -import java.util.Iterator;
> -import java.util.List;
> -
> -import javax.xml.namespace.QName;
> -import javax.xml.stream.XMLStreamException;
> -
>  import org.apache.axis.context.EngineContextFactory;
>  import org.apache.axis.deployment.listener.RepositoryListenerImpl;
> +import org.apache.axis.deployment.repository.utill.ArchiveFileData;
>  import org.apache.axis.deployment.repository.utill.ArchiveReader;
> -import org.apache.axis.deployment.repository.utill.HDFileItem;
>  import org.apache.axis.deployment.repository.utill.WSInfo;
>  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;
> -import org.apache.axis.description.Flow;
> -import org.apache.axis.description.HandlerDescription;
> -import org.apache.axis.description.Parameter;
> +import org.apache.axis.deployment.util.DeploymentData;
> +import org.apache.axis.description.*;
>  import org.apache.axis.engine.*;
>  import org.apache.axis.modules.Module;
>  import org.apache.axis.phaseresolver.PhaseException;
> @@ -51,6 +33,13 @@
>  import org.apache.commons.logging.Log;
>  import org.apache.commons.logging.LogFactory;
> 
> +import javax.xml.namespace.QName;
> +import javax.xml.stream.XMLStreamException;
> +import java.io.*;
> +import java.util.ArrayList;
> +import java.util.Iterator;
> +import java.util.List;
> +
> 
>  public class DeploymentEngine implements DeploymentConstants {
> 
> @@ -92,7 +81,7 @@
>      // private static ServerMetaData axisGlobal = new ServerMetaData();
>      private GlobalDescription axisGlobal;
> 
> -    private HDFileItem currentFileItem;
> +    private ArchiveFileData currentArchiveFile;
> 
>      //tobuild chains
>      private EngineContextFactory factory;
> @@ -149,8 +138,8 @@
>          this.engineConfigName = RepositaryName + '/' + serverXMLFile;
>      }
> 
> -    public HDFileItem getCurrentFileItem() {
> -        return currentFileItem;
> +    public ArchiveFileData getCurrentFileItem() {
> +        return currentArchiveFile;
>      }
> 
> @@ -227,7 +216,7 @@
>              parser.processGlobalConfig(axisGlobal);
>          } catch (FileNotFoundException e) {
>              throw new DeploymentException("Exception at deployment", e);
> -        }  catch (XMLStreamException e) {
> +        } catch (XMLStreamException e) {
>              throw new DeploymentException(e.getMessage());
>          }
>          hotDeployment = false;
> @@ -259,17 +248,19 @@
>      /**
>       * This method is to check wether some one has change the system pre defined phases for all the
>       * flows if some one has done so will throw a DeploymentException
> +     *
>       * @throws DeploymentException
>       */
>      private void validateSystemPredefinedPhases() throws DeploymentException {
> -        DeploymentTempData tempdata = DeploymentTempData.getInstance();
> +        DeploymentData tempdata = DeploymentData.getInstance();
>          ArrayList inPhases = tempdata.getINPhases();
> -        if(! (((Phase)inPhases.get(0)).getPhaseName().equals(PhaseMetadata.PHASE_TRANSPORTIN) &&
> -        ((Phase)inPhases.get(1)).getPhaseName().equals(PhaseMetadata.PHASE_PRE_DISPATCH) &&
> -        ((Phase)inPhases.get(2)).getPhaseName().equals(PhaseMetadata.PHASE_DISPATCH) &&
> -        ((Phase)inPhases.get(3)).getPhaseName().equals(PhaseMetadata.PHASE_POST_DISPATCH))){
> -           throw new DeploymentException("Invalid System predefined inphases , phase order dose not" +
> -                   " support\n recheck server.xml");
> +        //TODO condition checking should be otherway since null value can occur
> +        if (!(((Phase) inPhases.get(0)).getPhaseName().equals(PhaseMetadata.PHASE_TRANSPORTIN) &&
> +                ((Phase) inPhases.get(1)).getPhaseName().equals(PhaseMetadata.PHASE_PRE_DISPATCH) &&
> +                ((Phase) inPhases.get(2)).getPhaseName().equals(PhaseMetadata.PHASE_DISPATCH) &&
> +                ((Phase) inPhases.get(3)).getPhaseName().equals(PhaseMetadata.PHASE_POST_DISPATCH))) {
> +            throw new DeploymentException("Invalid System predefined inphases , phase order dose not" +
> +                    " support\n recheck server.xml");
>          }
>          ArrayList outPhaes = tempdata.getOUTPhases();
>          //TODO do the validation code here
> @@ -290,7 +281,7 @@
>          scheduler.schedule(new SchedulerTask(engine, folderName), new DeploymentIterator());
>      }
> 
> -    private AxisConfiguration createEngineConfig(){
> +    private AxisConfiguration createEngineConfig() {
>          axisGlobal = new GlobalDescription();
>          AxisConfiguration newEngineConfig = new AxisSystemImpl(axisGlobal);
>          return newEngineConfig;
> @@ -299,7 +290,7 @@
> 
>      private void addnewService(ServiceDescription serviceMetaData) throws AxisFault {
>          try {
> -            currentFileItem.setClassLoader();
> +            currentArchiveFile.setClassLoader();
>              loadServiceProperties(serviceMetaData);
>              axisConfig.addService(serviceMetaData);
>              factory.createChains(serviceMetaData, axisConfig);
> @@ -337,16 +328,16 @@
>          if (faultOutFlow != null) {
>              addFlowHandlers(faultOutFlow);
>          }
> -        axisService.setClassLoader(currentFileItem.getClassLoader());
> +        axisService.setClassLoader(currentArchiveFile.getClassLoader());
>      }
> 
>      private void loadModuleClass(ModuleDescription module) throws AxisFault {
>          Class moduleClass = null;
>          try {
> -            String readInClass = currentFileItem.getModuleClass();
> +            String readInClass = currentArchiveFile.getModuleClass();
>              if (readInClass != null && !"".equals(readInClass)) {
> -                moduleClass = Class.forName(readInClass, true, currentFileItem.getClassLoader());
> +                moduleClass = Class.forName(readInClass, true, currentArchiveFile.getClassLoader());
>                  module.setModule((Module) moduleClass.newInstance());
>              }
>          } catch (Exception e) {
> @@ -358,7 +349,7 @@
> 
>      private void addFlowHandlers(Flow flow) throws AxisFault {
>          int count = flow.getHandlerCount();
> -        ClassLoader loader1 = currentFileItem.getClassLoader();
> +        ClassLoader loader1 = currentArchiveFile.getClassLoader();
>          for (int j = 0; j < count; j++) {
>              //todo handle exception in properway
>              HandlerDescription handlermd = flow.getHandler(j);
> @@ -393,7 +384,7 @@
> 
>      private void addNewModule(ModuleDescription moduelmetada) throws AxisFault {
> -        currentFileItem.setClassLoader();
> +        currentArchiveFile.setClassLoader();
>          Flow inflow = moduelmetada.getInFlow();
>          addFlowHandlers(inflow);
> 
> @@ -413,7 +404,7 @@
>      /**
>       * @param file
>       */
> -    public void addtowsToDeploy(HDFileItem file) {
> +    public void addtowsToDeploy(ArchiveFileData file) {
>          wsToDeploy.add(file);
>      }
> 
> @@ -428,53 +419,53 @@
>          //todo complete this
>          if (wsToDeploy.size() > 0) {
>              for (int i = 0; i < wsToDeploy.size(); i++) {
> -                currentFileItem = (HDFileItem) wsToDeploy.get(i);
> -                int type = currentFileItem.getType();
> +                currentArchiveFile = (ArchiveFileData) wsToDeploy.get(i);
> +                int type = currentArchiveFile.getType();
>                  ArchiveReader archiveReader = new ArchiveReader();
>                  String serviceStatus = "";
>                  switch (type) {
>                      case SERVICE:
>                          try {
> -                            ServiceDescription service = archiveReader.createService(currentFileItem.getAbsolutePath());
> -                            archiveReader.readServiceArchive(currentFileItem.getAbsolutePath(), this, service);
> +                            ServiceDescription service = archiveReader.createService(currentArchiveFile.getAbsolutePath());
> +                            archiveReader.readServiceArchive(currentArchiveFile.getAbsolutePath(), this, service);
>                              addnewService(service);
> -                            log.info("Deployement WS Name  " + currentFileItem.getName());
> +                            log.info("Deployement WS Name  " + currentArchiveFile.getName());
>                          } catch (DeploymentException de) {
> -                            log.info("Invalid service" + currentFileItem.getName());
> +                            log.info("Invalid service" + currentArchiveFile.getName());
>                              log.info("DeploymentException  " + de);
>                              serviceStatus = "Error:\n" + de.getMessage();
>                              de.printStackTrace();
>                          } catch (AxisFault axisFault) {
> -                            log.info("Invalid service" + currentFileItem.getName());
> +                            log.info("Invalid service" + currentArchiveFile.getName());
>                              log.info("AxisFault  " + axisFault);
>                              serviceStatus = "Error:\n" + axisFault.getMessage();
>                              axisFault.printStackTrace();
>                          } catch (Exception e) {
> -                            log.info("Invalid service" + currentFileItem.getName());
> +                            log.info("Invalid service" + currentArchiveFile.getName());
>                              log.info("Exception  " + e);
>                              serviceStatus = "Error:\n" + e.getMessage();
>                              e.printStackTrace();
>                          } finally {
>                              if (serviceStatus.startsWith("Error:")) {
> -                                axisConfig.getFaulytServices().put(getAxisServiceName(currentFileItem.getName()), serviceStatus);
> +                                axisConfig.getFaulytServices().put(getAxisServiceName(currentArchiveFile.getName()), serviceStatus);
>                              }
> -                            currentFileItem = null;
> +                            currentArchiveFile = null;
>                          }
>                          break;
>                      case MODULE:
>                          try {
>                              ModuleDescription metaData = new ModuleDescription();
> -                            archiveReader.readModuleArchive(currentFileItem.getAbsolutePath(), this, metaData);
> +                            archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, metaData);
>                              addNewModule(metaData);
> -                            log.info("Moduel WS Name  " + currentFileItem.getName() + " modulename :" + metaData.getName());
> +                            log.info("Moduel WS Name  " + currentArchiveFile.getName() + " modulename :" + metaData.getName());
>                          } catch (DeploymentException e) {
> -                            log.info("Invalid module" + currentFileItem.getName());
> +                            log.info("Invalid module" + currentArchiveFile.getName());
>                              log.info("DeploymentException  " + e);
>                          } catch (AxisFault axisFault) {
> -                            log.info("Invalid module" + currentFileItem.getName());
> +                            log.info("Invalid module" + currentArchiveFile.getName());
>                              log.info("AxisFault  " + axisFault);
>                          } finally {
> -                            currentFileItem = null;
> +                            currentArchiveFile = null;
>                          }
>                          break;
> 
> @@ -531,8 +522,8 @@
>      /* public ServiceDescription deployService(ClassLoader classLoder, InputStream serviceStream, String servieName) throws DeploymentException {
>      ServiceDescription service = null;
>      try {
> -    currentFileItem = new HDFileItem(SERVICE, servieName);
> -    currentFileItem.setClassLoader(classLoder);
> +    currentArchiveFileile = new ArchiveFileData(SERVICE, servieName);
> +    currentArchiveFileile.setClassLoader(classLoder);
>      service = new ServiceDescription();
>      DeploymentParser schme = new DeploymentParser(serviceStream, this);
>      schme.parseServiceXML(service);
> 
> 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=169923&r1=169922&r2=169923&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 19:59:25 2005
> @@ -16,33 +16,20 @@
> 
>  package org.apache.axis.deployment;
> 
> -import java.io.InputStream;
> -import java.util.ArrayList;
> +import org.apache.axis.deployment.util.DeploymentData;
> +import org.apache.axis.description.*;
> +import org.apache.axis.engine.AxisFault;
> +import org.apache.axis.engine.MessageReceiver;
> +import org.apache.axis.transport.TransportReceiver;
> +import org.apache.axis.transport.TransportSender;
> 
>  import javax.xml.namespace.QName;
>  import javax.xml.stream.XMLInputFactory;
>  import javax.xml.stream.XMLStreamConstants;
>  import javax.xml.stream.XMLStreamException;
>  import javax.xml.stream.XMLStreamReader;
> -
> -import org.apache.axis.description.GlobalDescription;
> -import org.apache.axis.description.ModuleDescription;
> -import org.apache.axis.description.OperationDescription;
> -import org.apache.axis.description.ServiceDescription;
> -import org.apache.axis.description.TransportInDescription;
> -import org.apache.axis.description.TransportOutDescription;
> -import org.apache.axis.description.Flow;
> -import org.apache.axis.description.FlowImpl;
> -import org.apache.axis.description.HandlerDescription;
> -import org.apache.axis.description.Parameter;
> -import org.apache.axis.description.ParameterImpl;
> -import org.apache.axis.engine.AxisFault;
> -import org.apache.axis.engine.AxisSystemImpl;
> -import org.apache.axis.engine.MessageReceiver;
> -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;
> +import java.io.InputStream;
> +import java.util.ArrayList;
> 
>  /**
> @@ -171,7 +158,7 @@
>                          }
>                      } else if (PHASE_ORDER.equals(ST)) {
>                          int attribCount = pullparser.getAttributeCount();
> -                        DeploymentTempData tempdata = DeploymentTempData.getInstance();
> +                        DeploymentData tempdata = DeploymentData.getInstance();
>                          if (attribCount > 0) {
>                              for (int i = 0; i < attribCount; i++) {
>                                  String attname = pullparser.getAttributeLocalName(i);
> @@ -385,6 +372,7 @@
>                          // processBeanMapping();
>                      } else if (OPRATIONST.equals(ST)) {
>                          OperationDescription operation = processOperation();
> +                        DeploymentData.getInstance().setOperationPhases(operation);
>                          axisService.addOperation(operation);
>                      } else if (INFLOWST.equals(ST)) {
>                          Flow inFlow = processInFlow();
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java Thu May 12 19:59:25 2005
> @@ -16,13 +16,13 @@
> 
>  package org.apache.axis.deployment.listener;
> 
> -import java.io.File;
> -import java.util.ArrayList;
> -import java.util.List;
> -
>  import org.apache.axis.deployment.DeploymentConstants;
>  import org.apache.axis.deployment.DeploymentEngine;
>  import org.apache.axis.deployment.repository.utill.WSInfoList;
> +
> +import java.io.File;
> +import java.util.ArrayList;
> +import java.util.List;
> 
>  public class RepositoryListenerImpl implements RepositoryListener, DeploymentConstants {
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/ArchiveReader.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/ArchiveReader.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/ArchiveReader.java (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/ArchiveReader.java Thu May 12 19:59:25 2005
> @@ -16,10 +16,6 @@
> 
>  package org.apache.axis.deployment.repository.utill;
> 
> -import java.io.FileInputStream;
> -import java.util.zip.ZipEntry;
> -import java.util.zip.ZipInputStream;
> -
>  import org.apache.axis.deployment.DeploymentConstants;
>  import org.apache.axis.deployment.DeploymentEngine;
>  import org.apache.axis.deployment.DeploymentException;
> @@ -28,6 +24,10 @@
>  import org.apache.axis.description.ModuleDescription;
>  import org.apache.axis.description.ServiceDescription;
>  import org.apache.axis.wsdl.builder.wsdl4j.WSDL1ToWOMBuilder;
> +
> +import java.io.FileInputStream;
> +import java.util.zip.ZipEntry;
> +import java.util.zip.ZipInputStream;
> 
>  public class ArchiveReader implements DeploymentConstants {
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/WSInfoList.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/WSInfoList.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/WSInfoList.java (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/utill/WSInfoList.java Thu May 12 19:59:25 2005
> @@ -16,14 +16,14 @@
> 
>  package org.apache.axis.deployment.repository.utill;
> 
> +import org.apache.axis.deployment.DeploymentConstants;
> +import org.apache.axis.deployment.DeploymentEngine;
> +
>  import java.io.File;
>  import java.util.ArrayList;
>  import java.util.Iterator;
>  import java.util.List;
> 
> -import org.apache.axis.deployment.DeploymentConstants;
> -import org.apache.axis.deployment.DeploymentEngine;
> -
>  public class WSInfoList implements DeploymentConstants {
>      /**
>       * This is to store all the jar files in a specified folder (WEB_INF)
> @@ -73,8 +73,8 @@
>                      if (!isFileExist(file.getName())) { // chacking whether the file is already deployed
>                          WSInfo wsInfo = new WSInfo(file.getName(), file.lastModified(), SERVICE);
>                          jarlist.add(wsInfo);
> -                        HDFileItem hdFileItem = new HDFileItem(file, SERVICE);
> -                        deplorer.addtowsToDeploy(hdFileItem);//to inform that new web service is deployed
> +                        ArchiveFileData archiveFileData = new ArchiveFileData(file, SERVICE);
> +                        deplorer.addtowsToDeploy(archiveFileData);//to inform that new web service is deployed
>                      } else {
>                          if (deplorer.isHotUpdate()) {
>                              WSInfo tempWSInfo = getFileItem(file.getName());
> @@ -82,8 +82,8 @@
>                                  tempWSInfo.setLastmodifieddate(file.lastModified());
>                                  WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(), tempWSInfo.getLastmodifieddate(), SERVICE);
>                                  deplorer.addtowstoUnDeploy(wsInfo);  // add entry to undeploy list
> -                                HDFileItem hdFileItem = new HDFileItem(file, SERVICE);
> -                                deplorer.addtowsToDeploy(hdFileItem);   // add entry to deploylist
> +                                ArchiveFileData archiveFileData = new ArchiveFileData(file, SERVICE);
> +                                deplorer.addtowsToDeploy(archiveFileData);   // add entry to deploylist
> 
>                              }
>                          }
> @@ -95,8 +95,8 @@
>                      if (!isFileExist(file.getName())) {  // chacking whether the file is already deployed
>                          WSInfo wsInfo = new WSInfo(file.getName(), file.lastModified(), MODULE);
>                          jarlist.add(wsInfo);
> -                        HDFileItem hdFileItem = new HDFileItem(file, MODULE);
> -                        deplorer.addtowsToDeploy(hdFileItem);//to inform that new web service is deployed
> +                        ArchiveFileData archiveFileData = new ArchiveFileData(file, MODULE);
> +                        deplorer.addtowsToDeploy(archiveFileData);//to inform that new web service is deployed
>                      } else {
>                          if (deplorer.isHotUpdate()) {
>                              WSInfo tempWSInfo = getFileItem(file.getName());
> @@ -104,8 +104,8 @@
>                                  tempWSInfo.setLastmodifieddate(file.lastModified());
>                                  WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(), tempWSInfo.getLastmodifieddate(), MODULE);
>                                  deplorer.addtowstoUnDeploy(wsInfo);   // add entry to undeploy list
> -                                HDFileItem hdFileItem = new HDFileItem(file, MODULE);
> -                                deplorer.addtowsToDeploy(hdFileItem); // add entry to deploylist
> +                                ArchiveFileData archiveFileData = new ArchiveFileData(file, MODULE);
> +                                deplorer.addtowsToDeploy(archiveFileData); // add entry to deploylist
> 
>                              }
>                          }
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/scheduler/SchedulerTask.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/scheduler/SchedulerTask.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/scheduler/SchedulerTask.java (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/scheduler/SchedulerTask.java Thu May 12 19:59:25 2005
> @@ -16,11 +16,11 @@
> 
>  package org.apache.axis.deployment.scheduler;
> 
> -import java.util.TimerTask;
> -
>  import org.apache.axis.deployment.DeploymentEngine;
>  import org.apache.axis.deployment.listener.RepositoryListener;
>  import org.apache.axis.deployment.listener.RepositoryListenerImpl;
> +
> +import java.util.TimerTask;
> 
>  public class SchedulerTask implements Runnable {
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/server.xml
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/server.xml?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/server.xml (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/server.xml Thu May 12 19:59:25 2005
> @@ -9,7 +9,7 @@
>      <transportSender name="http" class="org.apache.axis.transport.http.HTTPTransportSender">
>      </transportSender>
> 
> -    <module ref="addressing" />
> +    <module ref="addressing"/>
> 
>      <phaseOrder type="inflow">
> 
> Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentData.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentData.java?rev=169923&view=auto
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentData.java (added)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/util/DeploymentData.java Thu May 12 19:59:25 2005
> @@ -0,0 +1,156 @@
> +package org.apache.axis.deployment.util;
> +
> +import org.apache.axis.description.OperationDescription;
> +import org.apache.axis.engine.Phase;
> +import org.apache.axis.phaseresolver.PhaseMetadata;
> +
> +import java.util.ArrayList;
> +
> +/*
> +* 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.
> +*
> +*
> +*/
> +
> +/**
> + * Author : Deepal Jayasinghe
> + * Date: May 12, 2005
> + * Time: 7:14:26 PM
> + */
> +public class DeploymentData {
> +
> +    private static DeploymentData deploymentData;
> +
> +    private ArrayList INPhases;
> +    private ArrayList OUTPhases;
> +    private ArrayList IN_FaultPhases;
> +    private ArrayList OUT_FaultPhases;
> +
> +    private ArrayList oprationINPhases;
> +    private ArrayList oprationOUTPhases;
> +    private ArrayList oprationIN_FaultPhases;
> +    private ArrayList oprationOUT_FaultPhases;
> +
> +    private DeploymentData() {
> +
> +    }
> +
> +    public static DeploymentData getInstance() {
> +        if (deploymentData == null) {
> +            deploymentData = new DeploymentData();
> +        }
> +        return deploymentData;
> +    }
> +
> +
> +    public void setINPhases(ArrayList INPhases) {
> +        this.INPhases = INPhases;
> +    }
> +
> +    public void setOUTPhases(ArrayList OUTPhases) {
> +        this.OUTPhases = OUTPhases;
> +    }
> +
> +    public void setIN_FaultPhases(ArrayList IN_FaultPhases) {
> +        this.IN_FaultPhases = IN_FaultPhases;
> +    }
> +
> +    public void setOUT_FaultPhases(ArrayList OUT_FaultPhases) {
> +        this.OUT_FaultPhases = OUT_FaultPhases;
> +    }
> +
> +    public ArrayList getINPhases() {
> +        return INPhases;
> +    }
> +
> +    public ArrayList getOUTPhases() {
> +        return OUTPhases;
> +    }
> +
> +    public ArrayList getIN_FaultPhases() {
> +        return IN_FaultPhases;
> +    }
> +
> +    public ArrayList getOUT_FaultPhases() {
> +        return OUT_FaultPhases;
> +    }
> +
> +    private ArrayList getOperationInPhases() {
> +        if (oprationINPhases == null) {
> +            oprationINPhases = new ArrayList();
> +            for (int i = 0; i < INPhases.size(); i++) {
> +                String phaseName = (String) INPhases.get(i);
> +                if (PhaseMetadata.PHASE_TRANSPORTIN.equals(phaseName) ||
> +                        PhaseMetadata.PHASE_PRE_DISPATCH.equals(phaseName) ||
> +                        PhaseMetadata.PHASE_DISPATCH.equals(phaseName) ||
> +                        PhaseMetadata.PHASE_POST_DISPATCH.equals(phaseName)) {
> +                    continue;
> +                } else {
> +                    oprationINPhases.add(new Phase(phaseName));
> +                }
> +            }
> +
> +        }
> +        return oprationINPhases;
> +    }
> +
> +    private ArrayList getOperationOutPhases() {
> +        if (oprationOUTPhases == null) {
> +            oprationOUTPhases = new ArrayList();
> +            for (int i = 0; i < OUTPhases.size(); i++) {
> +                String phaseName = (String) OUTPhases.get(i);
> +                if (PhaseMetadata.PHASE_TRANSPORT_OUT.equals(phaseName)) {
> +                    continue;
> +                } else {
> +                    oprationOUTPhases.add(new Phase(phaseName));
> +                }
> +            }
> +        }
> +        return oprationOUTPhases;
> +    }
> +
> +    private ArrayList getOperationInFaultPhases() {
> +        if (oprationIN_FaultPhases == null) {
> +            oprationIN_FaultPhases = new ArrayList();
> +            for (int i = 0; i < IN_FaultPhases.size(); i++) {
> +                String phaseName = (String) IN_FaultPhases.get(i);
> +                oprationIN_FaultPhases.add(new Phase(phaseName));
> +            }
> +        }
> +        return oprationIN_FaultPhases;
> +    }
> +
> +    private ArrayList getOperationOutFaultPhases() {
> +        if (oprationOUT_FaultPhases == null) {
> +            oprationOUT_FaultPhases = new ArrayList();
> +            for (int i = 0; i < OUT_FaultPhases.size(); i++) {
> +                String phaseName = (String) OUT_FaultPhases.get(i);
> +                oprationOUT_FaultPhases.add(new Phase(phaseName));
> +            }
> +        }
> +        return oprationOUT_FaultPhases;
> +    }
> +
> +    public void setOperationPhases(OperationDescription operation) {
> +        if (operation != null) {
> +            operation.setRemainingPhasesInFlow(getOperationInPhases());
> +            operation.setPhasesOutFlow(getOperationOutPhases());
> +            operation.setPhasesInFaultFlow(getOperationInFaultPhases());
> +            operation.setPhasesOutFaultFlow(getOperationOutFaultPhases());
> +        }
> +    }
> +
> +
> +}
> 
> Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java (original)
> +++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java Thu May 12 19:59:25 2005
> @@ -23,14 +23,14 @@
>   *
>   */
>  public class OperationDescription extends WSDLOperationImpl implements
> -               ParameterInclude, WSDLOperation, DescriptionConstants, PhasesInclude,
> +               ParameterInclude, WSDLOperation, DescriptionConstants,
>                 WSDLConstants {
> 
>         private MessageReceiver messageReceiver;
> -    private ArrayList remainingPhasesInInFlow;
> -    private ArrayList phasesInOutFlow;
> -    private ArrayList phasesInFaultInFlow;
> -    private ArrayList phasesInFaultOutFlow;
> +    private ArrayList remainingPhasesInFlow;
> +    private ArrayList phasesOutFlow;
> +    private ArrayList phasesInFaultFlow;
> +    private ArrayList phasesOutFaultFlow;
> 
>         private int mep = MEP_CONSTANT_INVALID;
> 
> @@ -38,17 +38,16 @@
>                 this.setMessageExchangePattern(MEP_URI_IN_OUT);
>                 this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
>                 this.setComponentProperty(MODULEREF_KEY, new ArrayList());
> -               this.setComponentProperty(PHASES_KEY, new PhasesIncludeImpl());
> -
> -        remainingPhasesInInFlow = new ArrayList();
> -        remainingPhasesInInFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
> +
> +        remainingPhasesInFlow = new ArrayList();
> +        remainingPhasesInFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
> 
> -        phasesInOutFlow = new ArrayList();
> -        phasesInOutFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
> -        phasesInOutFlow.add(new Phase(PhaseMetadata.PHASE_MESSAGE_OUT));
> +        phasesOutFlow = new ArrayList();
> +        phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
> +        phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_MESSAGE_OUT));
> 
> -        phasesInFaultInFlow = new ArrayList();
> -        phasesInFaultOutFlow = new ArrayList();
> +        phasesInFaultFlow = new ArrayList();
> +        phasesOutFaultFlow = new ArrayList();
>         }
> 
>         public OperationDescription(QName name) {
> @@ -177,34 +176,7 @@
>                 this.messageReceiver = messageReceiver;
>         }
> 
> -       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);
> -       }
> -
> +
>         /**
>          * This method will simply map the String URI of the Message exchange
>          * pattern to a integer. Further in the first lookup it will cash the looked
> @@ -250,57 +222,57 @@
>      /**
>       * @return
>       */
> -    public ArrayList getPhasesInFaultInFlow() {
> -        return phasesInFaultInFlow;
> +    public ArrayList getPhasesInFaultFlow() {
> +        return phasesInFaultFlow;
>      }
> 
>      /**
>       * @return
>       */
> -    public ArrayList getPhasesInFaultOutFlow() {
> -        return phasesInFaultOutFlow;
> +    public ArrayList getPhasesOutFaultFlow() {
> +        return phasesOutFaultFlow;
>      }
> 
>      /**
>       * @return
>       */
> -    public ArrayList getPhasesInOutFlow() {
> -        return phasesInOutFlow;
> +    public ArrayList getPhasesOutFlow() {
> +        return phasesOutFlow;
>      }
> 
>      /**
>       * @return
>       */
> -    public ArrayList getRemainingPhasesInInFlow() {
> -        return remainingPhasesInInFlow;
> +    public ArrayList getRemainingPhasesInFlow() {
> +        return remainingPhasesInFlow;
>      }
> 
>      /**
>       * @param list
>       */
> -    public void setPhasesInFaultInFlow(ArrayList list) {
> -        phasesInFaultInFlow = list;
> +    public void setPhasesInFaultFlow(ArrayList list) {
> +        phasesInFaultFlow = list;
>      }
> 
>      /**
>       * @param list
>       */
> -    public void setPhasesInFaultOutFlow(ArrayList list) {
> -        phasesInFaultOutFlow = list;
> +    public void setPhasesOutFaultFlow(ArrayList list) {
> +        phasesOutFaultFlow = list;
>      }
> 
>      /**
>       * @param list
>       */
> -    public void setPhasesInOutFlow(ArrayList list) {
> -        phasesInOutFlow = list;
> +    public void setPhasesOutFlow(ArrayList list) {
> +        phasesOutFlow = list;
>      }
> 
>      /**
>       * @param list
>       */
> -    public void setRemainingPhasesInInFlow(ArrayList list) {
> -        remainingPhasesInInFlow = list;
> +    public void setRemainingPhasesInFlow(ArrayList list) {
> +        remainingPhasesInFlow = list;
>      }
> 
>  }
> 
> 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?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- 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 Thu May 12 19:59:25 2005
> @@ -66,7 +66,7 @@
>              verifyContextBuilt(msgContext);
>              OperationContext operationContext = msgContext.getOperationContext();
> 
> -            ArrayList phases = operationContext.getAxisOperation().getPhasesInOutFlow();
> +            ArrayList phases = operationContext.getAxisOperation().getPhasesOutFlow();
>              invokePhases(phases, msgContext);
> 
>              TransportSender sender = msgContext.getTransportOut().getSender();
> @@ -95,7 +95,7 @@
>              invokePhases(phases, context);
> 
>              OperationContext operationContext = context.getOperationContext();
> -            phases = operationContext.getAxisOperation().getPhasesInOutFlow();
> +            phases = operationContext.getAxisOperation().getPhasesOutFlow();
>              invokePhases(phases, context);
>              if (context.isServerSide()) {
>                  // add invoke Phase
> @@ -144,7 +144,7 @@
>              OperationContext opContext  = context.getOperationContext();
>              if(opContext != null){
>                  OperationDescription axisOperation = opContext.getAxisOperation();
> -                ArrayList phases = axisOperation.getPhasesInFaultOutFlow();
> +                ArrayList phases = axisOperation.getPhasesOutFaultFlow();
>                  invokePhases(phases, context);
>              }
>              // Write the the error
> 
> 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=169923&r1=169922&r2=169923&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 Thu May 12 19:59:25 2005
> @@ -15,16 +15,15 @@
>  */
>  package org.apache.axis.phaseresolver;
> 
> -import java.util.ArrayList;
> -
> -import org.apache.axis.context.ConfigurationContext;
>  import org.apache.axis.description.HandlerDescription;
>  import org.apache.axis.description.PhasesInclude;
> -import org.apache.axis.engine.AxisFault;
>  import org.apache.axis.engine.AxisConfiguration;
> +import org.apache.axis.engine.AxisFault;
>  import org.apache.axis.engine.Handler;
>  import org.apache.axis.engine.Phase;
> 
> +import java.util.ArrayList;
> +
> 
>  /**
>   * This class hold all the phases found in the service.xml and server.xml
> @@ -32,101 +31,24 @@
>  public class PhaseHolder {
> 
>      /**
> -     * Field phaseholder
> +     * Field phasemetadatholder
>       */
> -    private ArrayList phaseholder = new ArrayList();
> -
> -    /**
> -     * Referance to ServerMetaData inorder to get information about phases.
> -     */
> -    private final AxisConfiguration registry;    // = new  ServerMetaData();
> -
> -    private PhasesInclude phaseInclude;
> +    private ArrayList phasemetadatholder;
> 
> -    private ArrayList inPhases;
> -    private ArrayList outPhases;
> -    private ArrayList faultInPhases;
> -    private ArrayList faultOutPhases;
> +    private ArrayList phaseList;
> 
> -
> -    /**
> -     * Constructor PhaseHolder
> -     *
> -     * @param registry
> -     */
> -    public PhaseHolder(AxisConfiguration registry, PhasesInclude phaseInclude) {
> -        this.registry = registry;
> -        this.phaseInclude = phaseInclude;
> -        fillFlowPhases();
> -    }
> -
> -    public PhaseHolder(AxisConfiguration registry) {
> -        this.registry = registry;
> -        this.phaseInclude = null;
> -        fillFlowPhases();
> +    public PhaseHolder(ArrayList phases) {
> +        this.phaseList = phases;
> +        fillPhaseMetaData();
>      }
> 
> -
> -    public void setFlowType(int flowType) {
> -        switch (flowType) {
> -            case PhaseMetadata.IN_FLOW:
> -                {
> -                    phaseholder = inPhases;
> -                    break;
> -                }
> -            case PhaseMetadata.OUT_FLOW:
> -                {
> -                    phaseholder = outPhases;
> -                    break;
> -                }
> -            case PhaseMetadata.FAULT_IN_FLOW:
> -                {
> -                    phaseholder = faultInPhases;
> -                    break;
> -                }
> -            case PhaseMetadata.FAULT_OUT_FLOW:
> -                {
> -                    phaseholder = faultOutPhases;
> -                    break;
> -                }
> +    private void fillPhaseMetaData() {
> +        phasemetadatholder = new ArrayList();
> +        for (int i = 0; i < phaseList.size(); i++) {
> +            Phase phase = (Phase) phaseList.get(i);
> +            phasemetadatholder.add(new PhaseMetadata(phase.getPhaseName()));
>          }
> -    }
> 
> -    private void fillFlowPhases() {
> -        inPhases = new ArrayList();
> -        outPhases = new ArrayList();
> -        faultInPhases = new ArrayList();
> -        faultOutPhases = new ArrayList();
> -//TODO deepal fix this
> -//        ArrayList tempPhases = registry.getInPhasesUptoAndIncludingPostDispatch();
> -//        for (int i = 0; i < tempPhases.size(); i++) {
> -//            String name = (String) tempPhases.get(i);
> -//            PhaseMetadata pm = new PhaseMetadata(name);
> -//            inPhases.add(pm);
> -//        }
> -//        inPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
> -//        tempPhases = registry.getOutFlow();
> -//        for (int i = 0; i < tempPhases.size(); i++) {
> -//            String name = (String) tempPhases.get(i);
> -//            PhaseMetadata pm = new PhaseMetadata(name);
> -//            outPhases.add(pm);
> -//        }
> -//        outPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
> -//
> -//        tempPhases = registry.getInFaultFlow();
> -//        faultInPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
> -//        for (int i = 0; i < tempPhases.size(); i++) {
> -//            String name = (String) tempPhases.get(i);
> -//            PhaseMetadata pm = new PhaseMetadata(name);
> -//            faultInPhases.add(pm);
> -//        }
> -//        tempPhases = registry.getOutFaultFlow();
> -//        for (int i = 0; i < tempPhases.size(); i++) {
> -//            String name = (String) tempPhases.get(i);
> -//            PhaseMetadata pm = new PhaseMetadata(name);
> -//            faultOutPhases.add(pm);
> -//        }
> -//        faultOutPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
>      }
> 
>      /**
> @@ -136,8 +58,8 @@
>       * @return
>       */
>      private boolean isPhaseExist(String phaseName) {
> -        for (int i = 0; i < phaseholder.size(); i++) {
> -            PhaseMetadata phase = (PhaseMetadata) phaseholder.get(i);
> +        for (int i = 0; i < phasemetadatholder.size(); i++) {
> +            PhaseMetadata phase = (PhaseMetadata) phasemetadatholder.get(i);
>              if (phase.getName().equals(phaseName)) {
>                  return true;
>              }
> @@ -154,37 +76,24 @@
>      public void addHandler(HandlerDescription handler) throws PhaseException {
>          String phaseName = handler.getRules().getPhaseName();
>          if (isPhaseExist(phaseName)) {
> -            getPhase(phaseName).addHandler(handler);
> +            getPhaseMetaData(phaseName).addHandler(handler);
>          } else {
>              throw new PhaseException("Invalid Phase ," + phaseName
>                      + "for the handler "
>                      + handler.getName()
>                      + " dose not exit in server.xml or refering to phase in diffrent flow");
>          }
> -        /*
> -        else {
> -        if (isPhaseExistinER(phaseName)) {
> -        PhaseMetadata newpPhase = new PhaseMetadata(phaseName);
> -        addPhase(newpPhase);
> -        newpPhase.addHandler(handler);
> -        } else {
> -        throw new PhaseException("Invalid Phase ," + phaseName
> -        + "for the handler "
> -        + handler.getName()
> -        + " dose not exit in server.xml");
> -        }
> -        }*/
>      }
> 
>      /**
> -     * Method getPhase
> +     * Method getPhaseMetaData
>       *
>       * @param phaseName
>       * @return
>       */
> -    private PhaseMetadata getPhase(String phaseName) {
> -        for (int i = 0; i < phaseholder.size(); i++) {
> -            PhaseMetadata phase = (PhaseMetadata) phaseholder.get(i);
> +    private PhaseMetadata getPhaseMetaData(String phaseName) {
> +        for (int i = 0; i < phasemetadatholder.size(); i++) {
> +            PhaseMetadata phase = (PhaseMetadata) phasemetadatholder.get(i);
>              if (phase.getName().equals(phaseName)) {
>                  return phase;
>              }
> @@ -192,13 +101,30 @@
>          return null;
>      }
> 
> +    /**
> +     * this method is used to get the actual phase object given in the phase array list
> +     *
> +     * @param phaseName
> +     * @return
> +     */
> +    private Phase getPhase(String phaseName) {
> +        for (int i = 0; i < phaseList.size(); i++) {
> +            Phase phase = (Phase) phaseList.get(i);
> +            if (phase.getPhaseName().equals(phaseName)) {
> +                return phase;
> +            }
> +        }
> +        return null;
> +    }
> +
> +
>      public ArrayList getOrderHandler() throws PhaseException {
>          ArrayList handlerList = new ArrayList();
>          //OrderThePhases();
>          HandlerDescription[] handlers;
> -        for (int i = 0; i < phaseholder.size(); i++) {
> +        for (int i = 0; i < phasemetadatholder.size(); i++) {
>              PhaseMetadata phase =
> -                    (PhaseMetadata) phaseholder.get(i);
> +                    (PhaseMetadata) phasemetadatholder.get(i);
>              handlers = phase.getOrderedHandlers();
>              for (int j = 0; j < handlers.length; j++) {
>                  handlerList.add(handlers[j]);
> @@ -210,93 +136,22 @@
> 
>      /**
> -     * chainType
> -     * 1 : inFlowExcChain
> -     * 2 : OutFlowExeChain
> -     * 3 : FaultFlowExcechain
> -     *
> -     * @param chainType
> -     * @throws org.apache.axis.phaseresolver.PhaseException
> +     * This is used to order handlers inside a phase
>       *
>       * @throws PhaseException
>       */
> -    public void getOrderedHandlers(int chainType) throws PhaseException {
> -        try {
> -            //OrderThePhases();
> -
> -            HandlerDescription[] handlers;
> -            switch (chainType) {
> -                case PhaseMetadata.IN_FLOW:
> -                    {
> -                        ArrayList inChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            inChain.add(axisPhase);
> -                        }
> -                        phaseInclude.setPhases(inChain, AxisConfiguration.INFLOW);
> -                        // service.setPhases(inChain, EngineConfiguration.INFLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.OUT_FLOW:
> -                    {
> -                        ArrayList outChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            outChain.add(axisPhase);
> -                        }
> -                        //service.setPhases(outChain, EngineConfiguration.OUTFLOW);
> -                        phaseInclude.setPhases(outChain, AxisConfiguration.OUTFLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.FAULT_IN_FLOW:
> -                    {
> -                        ArrayList faultInChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            faultInChain.add(axisPhase);
> -                        }
> -                        phaseInclude.setPhases(faultInChain, AxisConfiguration.FAULT_IN_FLOW);
> -                        // service.setPhases(faultInChain, EngineConfiguration.FAULT_IN_FLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.FAULT_OUT_FLOW:
> -                    {
> -                        ArrayList faultOutChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            faultOutChain.add(axisPhase);
> -                        }
> -                        phaseInclude.setPhases(faultOutChain, AxisConfiguration.FAULT_OUT_FLOW);
> -                        //   service.setPhases(faultOutChain, EngineConfiguration.FAULT_IN_FLOW);
> -                        break;
> -                    }
> +    public void getOrderedHandlers() throws PhaseException {
> +        HandlerDescription[] handlers;
> +        for (int i = 0; i < phasemetadatholder.size(); i++) {
> +            PhaseMetadata phase =
> +                    (PhaseMetadata) phasemetadatholder.get(i);
> +            Phase axisPhase = getPhase(phase.getName());
> +            handlers = phase.getOrderedHandlers();
> +            if (axisPhase != null) {
> +                for (int j = 0; j < handlers.length; j++) {
> +                    axisPhase.addHandler(handlers[j].getHandler());
> +                }
>              }
> -        } catch (AxisFault e) {
> -            throw new PhaseException(e);
>          }
>      }
> 
> @@ -313,9 +168,9 @@
>                  case PhaseMetadata.IN_FLOW:
>                      {
>                          ArrayList inChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> +                        for (int i = 0; i < phasemetadatholder.size(); i++) {
>                              PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> +                                    (PhaseMetadata) phasemetadatholder.get(i);
>                              Phase axisPhase = new Phase(phase.getName());
>                              handlers = phase.getOrderedHandlers();
>                              for (int j = 0; j < handlers.length; j++) {
> @@ -343,9 +198,9 @@
>                  case PhaseMetadata.OUT_FLOW:
>                      {
>                          ArrayList outChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> +                        for (int i = 0; i < phasemetadatholder.size(); i++) {
>                              PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> +                                    (PhaseMetadata) phasemetadatholder.get(i);
>                              Phase axisPhase = new Phase(phase.getName());
>                              handlers = phase.getOrderedHandlers();
>                              for (int j = 0; j < handlers.length; j++) {
> @@ -373,9 +228,9 @@
>                  case PhaseMetadata.FAULT_IN_FLOW:
>                      {
>                          ArrayList faultChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> +                        for (int i = 0; i < phasemetadatholder.size(); i++) {
>                              PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> +                                    (PhaseMetadata) phasemetadatholder.get(i);
>                              Phase axisPhase = new Phase(phase.getName());
>                              handlers = phase.getOrderedHandlers();
>                              for (int j = 0; j < handlers.length; j++) {
> @@ -403,9 +258,9 @@
>                  case PhaseMetadata.FAULT_OUT_FLOW:
>                      {
>                          ArrayList faultChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> +                        for (int i = 0; i < phasemetadatholder.size(); i++) {
>                              PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> +                                    (PhaseMetadata) phasemetadatholder.get(i);
>                              Phase axisPhase = new Phase(phase.getName());
>                              handlers = phase.getOrderedHandlers();
>                              for (int j = 0; j < handlers.length; j++) {
> @@ -436,87 +291,4 @@
>          }
>      }
> 
> -
> -    /**
> -     * Method buildGlobalChain
> -     *
> -     * @param engineContext
> -     * @param chainType
> -     * @throws PhaseException
> -     */
> -    public void buildGlobalChain(ConfigurationContext engineContext, int chainType)
> -            throws PhaseException {
> -        try {
> -            //OrderThePhases();
> -            HandlerDescription[] handlers;
> -            switch (chainType) {
> -                case PhaseMetadata.IN_FLOW:
> -                    {
> -                        ArrayList inChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            inChain.add(axisPhase);
> -                        }
> -                        engineContext.setPhases(inChain, AxisConfiguration.INFLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.OUT_FLOW:
> -                    {
> -                        ArrayList outChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            outChain.add(axisPhase);
> -                        }
> -                        engineContext.setPhases(outChain, AxisConfiguration.OUTFLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.FAULT_IN_FLOW:
> -                    {
> -                        ArrayList faultChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            faultChain.add(axisPhase);
> -                        }
> -                        engineContext.setPhases(faultChain, AxisConfiguration.FAULT_IN_FLOW);
> -                        break;
> -                    }
> -                case PhaseMetadata.FAULT_OUT_FLOW:
> -                    {
> -                        ArrayList faultChain = new ArrayList();
> -                        for (int i = 0; i < phaseholder.size(); i++) {
> -                            PhaseMetadata phase =
> -                                    (PhaseMetadata) phaseholder.get(i);
> -                            Phase axisPhase = new Phase(phase.getName());
> -                            handlers = phase.getOrderedHandlers();
> -                            for (int j = 0; j < handlers.length; j++) {
> -                                axisPhase.addHandler(handlers[j].getHandler());
> -                            }
> -                            faultChain.add(axisPhase);
> -                        }
> -                        engineContext.setPhases(faultChain, AxisConfiguration.FAULT_OUT_FLOW);
> -                        break;
> -                    }
> -            }
> -        } catch (AxisFault e) {
> -            throw new PhaseException(e);
> -        }
> -    }
>  }
> 
> 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=169923&r1=169922&r2=169923&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 Thu May 12 19:59:25 2005
> @@ -15,10 +15,10 @@
>  */
>  package org.apache.axis.phaseresolver;
> 
> -import java.util.ArrayList;
> -
>  import org.apache.axis.description.HandlerDescription;
> 
> +import java.util.ArrayList;
> +
>  /**
>   * Class PhaseMetadata
>   */
> @@ -32,13 +32,14 @@
>      //INFLOW
>      public static final String PHASE_TRANSPORTIN = "TransportIn";
>      public static final String PHASE_PRE_DISPATCH = "PreDispatch";
> -    public static final String PHASE_DISPATCH ="Dispatch";
> -    public static final String PHASE_POST_DISPATCH ="PostDispatch";
> -    public static final String PHASE_POLICY_DETERMINATION ="PolicyDetermination";
> -    public static final String PHASE_MESSAGE_PROCESSING ="MessageProcessing";
> +    public static final String PHASE_DISPATCH = "Dispatch";
> +    public static final String PHASE_POST_DISPATCH = "PostDispatch";
> +    public static final String PHASE_POLICY_DETERMINATION = "PolicyDetermination";
> +    public static final String PHASE_MESSAGE_PROCESSING = "MessageProcessing";
> 
>      //OUTFLOW
> -    public static final String PHASE_MESSAGE_OUT ="MessageOut";
> +    public static final String PHASE_MESSAGE_OUT = "MessageOut";
> +    public static final String PHASE_TRANSPORT_OUT = "MessageOut";
> 
>      /**
>       * 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=169923&r1=169922&r2=169923&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 19:59:25 2005
> @@ -15,26 +15,15 @@
>  */
>  package org.apache.axis.phaseresolver;
> 
> -import java.util.ArrayList;
> -import java.util.Collection;
> -import java.util.HashMap;
> -import java.util.Iterator;
> -import java.util.List;
> -
> -import javax.xml.namespace.QName;
> -
>  import org.apache.axis.context.ConfigurationContext;
> -import org.apache.axis.description.GlobalDescription;
> -import org.apache.axis.description.ModuleDescription;
> -import org.apache.axis.description.OperationDescription;
> -import org.apache.axis.description.ServiceDescription;
> -import org.apache.axis.description.TransportInDescription;
> -import org.apache.axis.description.TransportOutDescription;
> -import org.apache.axis.description.Flow;
> -import org.apache.axis.description.HandlerDescription;
> -import org.apache.axis.engine.AxisFault;
> +import org.apache.axis.description.*;
>  import org.apache.axis.engine.AxisConfiguration;
> +import org.apache.axis.engine.AxisFault;
>  import org.apache.axis.engine.AxisSystemImpl;
> +import org.apache.axis.phaseresolver.util.PhaseValidator;
> +
> +import javax.xml.namespace.QName;
> +import java.util.*;
> 
>  /**
>   * Class PhaseResolver
> @@ -121,18 +110,13 @@
>          if (flow != null) {
>              for (int j = 0; j < flow.getHandlerCount(); j++) {
>                  HandlerDescription metadata = flow.getHandler(j);
> -                /**
> -                 * If the phase property of a handler is pre-dispatch then those handlers
> -                 * should go to the global chain , to the pre-dispatch phase
> -                 */
> -                //TODO fix me
> -//                if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
> -//                    continue;
> -//                }
> -                if (metadata.getRules().getPhaseName().equals("")) {
> -                    throw new PhaseException("Phase dose not specified");
> +
> +                if (!PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())) {
> +                    allHandlers.add(metadata);
> +                } else {
> +                    throw new PhaseException("Service specifi module can not refer system pre defined phases : "
> +                            + metadata.getRules().getPhaseName());
>                  }
> -                allHandlers.add(metadata);
>              }
>          }
>      }
> @@ -214,14 +198,34 @@
>              }
>          }
> 
> -        phaseHolder = new PhaseHolder(axisConfig, operation);
> -        phaseHolder.setFlowType(flowtype);
> +        switch (flowtype) {
> +            case PhaseMetadata.IN_FLOW:
> +                {
> +                    phaseHolder = new PhaseHolder(operation.getRemainingPhasesInFlow());
> +                    break;
> +                }
> +            case PhaseMetadata.OUT_FLOW:
> +                {
> +                    phaseHolder = new PhaseHolder(operation.getPhasesOutFlow());
> +                    break;
> +                }
> +            case PhaseMetadata.FAULT_IN_FLOW:
> +                {
> +                    phaseHolder = new PhaseHolder(operation.getPhasesInFaultFlow());
> +                    break;
> +                }
> +            case PhaseMetadata.FAULT_OUT_FLOW:
> +                {
> +                    phaseHolder = new PhaseHolder(operation.getPhasesOutFaultFlow());
> +                    break;
> +                }
> +        }
>          for (int i = 0; i < allHandlers.size(); i++) {
>              HandlerDescription handlerMetaData =
>                      (HandlerDescription) allHandlers.get(i);
>              phaseHolder.addHandler(handlerMetaData);
>          }
> -        phaseHolder.getOrderedHandlers(type);
> +        phaseHolder.getOrderedHandlers();
>      }
> 
>      /**
> @@ -251,35 +255,36 @@
> 
>      private void buildINTransportChains(TransportInDescription transport)
>              throws PhaseException {
> -        Flow flow = null;
> +        //TODO Fix me
> +        /*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);
> +        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);
> -                }
> -            }
> -            phaseHolder.buildTransportChain(transport, type);
> +        // todo change this in properway
> +        if (metadata.getRules().getPhaseName().equals("")) {
> +        throw new PhaseException("Phase dose not specified");
> +        }
> +        phaseHolder.addHandler(metadata);
>          }
> +        }
> +        phaseHolder.buildTransportChain(transport, type);
> +        }*/
>      }
> 
> @@ -291,35 +296,36 @@
>       */
>      private void buildOutTransportChains(TransportOutDescription transport)
>              throws PhaseException {
> -        Flow flow = null;
> +        //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);
> +        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);
> -                }
> -            }
> -            phaseHolder.buildTransportChain(transport, type);
> +        // todo change this in properway
> +        if (metadata.getRules().getPhaseName().equals("")) {
> +        throw new PhaseException("Phase dose not specified");
>          }
> +        phaseHolder.addHandler(metadata);
> +        }
> +        }
> +        phaseHolder.buildTransportChain(transport, type);
> +        }*/
>      }
> 
>      /**
> @@ -338,50 +344,71 @@
>          ModuleDescription module;
>          Flow flow = null;
>          for (int type = 1; type < 5; type++) {
> -            phaseHolder = new PhaseHolder(axisConfig);
> -            phaseHolder.setFlowType(type);
> -            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 the phase property of a handler is pre-dispatch then those handlers
> -                         * should go to the global chain , to the pre-dispatch phase
> -                         */
> -                        //TODO fix me
> -//                        if (PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
> -//                            phaseHolder.addHandler(metadata);
> -//                        } else {
> -//                            continue;
> -//                        }
> +            switch (type) {
> +                case PhaseMetadata.IN_FLOW:
> +                    {
> +                        phaseHolder = new PhaseHolder(((AxisSystemImpl) axisConfig).getInPhasesUptoAndIncludingPostDispatch());
> +                        break;
> +                    }
> +                case PhaseMetadata.OUT_FLOW:
> +                    {
> +                        phaseHolder = new PhaseHolder(((AxisSystemImpl) axisConfig).getOutFlow());
> +                        break;
> +                    }
> +                case PhaseMetadata.FAULT_IN_FLOW:
> +                    {
> +                        phaseHolder = new PhaseHolder(((AxisSystemImpl) axisConfig).getInFaultFlow());
> +                        break;
> +                    }
> +                case PhaseMetadata.FAULT_OUT_FLOW:
> +                    {
> +                        phaseHolder = new PhaseHolder(((AxisSystemImpl) axisConfig).getOutFaultFlow());
> +                        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 //////////////////////////////////
> +            ////////////////////////////////////////////////////////////////////////////////////
>              for (int intA = 0; intA < count; intA++) {
>                  moduleName = (QName) modules.get(intA);
>                  module = axisConfig.getModule(moduleName);
> @@ -410,16 +437,16 @@
>                  if (flow != null) {
>                      for (int j = 0; j < flow.getHandlerCount(); j++) {
>                          HandlerDescription metadata = flow.getHandler(j);
> -                        //TODO fix me
> -//                        if (!PhaseMetadata.PRE_DISPATCH.equals(metadata.getRules().getPhaseName())) {
> -//                            phaseHolder.addHandler(metadata);
> -//                        } else {
> -//                            continue;
> -//                        }
> +                        if (PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())) {
> +                            phaseHolder.addHandler(metadata);
> +                        } else {
> +                            throw new PhaseException("Global module can not refer service specific phases : "
> +                                    + metadata.getRules().getPhaseName());
> +                        }
>                      }
>                  }
>              }
> -            phaseHolder.buildGlobalChain(engineContext, type);
> +            phaseHolder.getOrderedHandlers();
>          }
>          return engineContext;
>      }
> 
> Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java (original)
> +++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/InvalidPhaseRuleTest.java Thu May 12 19:59:25 2005
> @@ -48,7 +48,8 @@
>      public void testInvalidPhaseRule1() {
>          try {
>              super.setUp();
> -            phaserul = new InvalidPhaseRuleTest("");
> +            //TODO fix me
> +            /*phaserul = new InvalidPhaseRuleTest("");
>              GlobalDescription global = new GlobalDescription();
>              registry = new AxisSystemImpl(global);
>              ArrayList inPhase = new ArrayList();
> @@ -99,7 +100,7 @@
>              for (int i = 0; i < oh.size(); i++) {
>                  HandlerDescription metadata = (HandlerDescription) oh.get(i);
>                  System.out.println("Name:" + metadata.getName().getLocalPart());
> -            }
> +            }*/
>              fail("this must failed gracefully with PhaseException ");
>          } catch (Exception e) {
>              e.printStackTrace();
> @@ -110,7 +111,8 @@
>      public void testInvalidPhaseRule2() {
>          try {
>              super.setUp();
> -            phaserul = new InvalidPhaseRuleTest("");
> +            //TODO Fix me
> +            /*phaserul = new InvalidPhaseRuleTest("");
>              GlobalDescription global = new GlobalDescription();
>              registry = new AxisSystemImpl(global);
>              ArrayList inPhase = new ArrayList();
> @@ -162,7 +164,7 @@
>              for (int i = 0; i < oh.size(); i++) {
>                  HandlerDescription metadata = (HandlerDescription) oh.get(i);
>                  System.out.println("Name:" + metadata.getName().getLocalPart());
> -            }
> +            }*/
>              fail("this must failed gracefully with PhaseException ");
>          } catch (Exception e) {
>              e.printStackTrace();
> 
> Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java (original)
> +++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PhaseRuleTest.java Thu May 12 19:59:25 2005
> @@ -30,7 +30,8 @@
> 
>      public void testPhaseRules() throws Exception {
>          super.setUp();
> -        phaserul = new PhaseRuleTest("");
> +        //TODO fix me
> +       /* phaserul = new PhaseRuleTest("");
>          GlobalDescription global = new GlobalDescription();
>          registry = new AxisSystemImpl(global);
>          ArrayList inPhase = new ArrayList();
> @@ -93,7 +94,9 @@
>          for (int i = 0; i < oh.size(); i++) {
>              HandlerDescription metadata = (HandlerDescription) oh.get(i);
>              System.out.println("Name:" + metadata.getName().getLocalPart());
> -        }
> +        }*/
> +
> +        fail("this must failed gracefully with PhaseException ");
>      }
> 
>      //
> 
> Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java
> URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java?rev=169923&r1=169922&r2=169923&view=diff
> ==============================================================================
> --- webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java (original)
> +++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/phaserule/PreDispatchPhaseRuleTest.java Thu May 12 19:59:25 2005
> @@ -46,7 +46,8 @@
>      }
> 
>      public void testPhaseRule() throws Exception {
> -        phaserul = new PreDispatchPhaseRuleTest("");
> +        //TODO Fix me
> +      /*  phaserul = new PreDispatchPhaseRuleTest("");
>          GlobalDescription global = new GlobalDescription();
>          registry = new AxisSystemImpl(global);
>          ArrayList inPhase = new ArrayList();
> @@ -129,6 +130,7 @@
>          for (int i = 0; i < oh.size(); i++) {
>              HandlerDescription metadata = (HandlerDescription) oh.get(i);
>              System.out.println("Name:" + metadata.getName().getLocalPart());
> -        }
> +        }*/
> +        fail("this must failed gracefully with PhaseException ");
>      }
>  }
> 
>

Mime
View raw message