You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by as...@apache.org on 2004/10/21 23:49:28 UTC

svn commit: rev 55269 - in webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis: deployement deployment deployment/deployEvents deployment/fileloader deployment/fileloader/utill deployment/module deployment/scheduler deployment/schemaparser deployment/service deployment/test deployment/util

Author: aslom
Date: Thu Oct 21 14:49:27 2004
New Revision: 55269

Added:
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeployCons.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentEngine.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentException.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListener.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListenerImpl.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/HDFileItem.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/UnZipJAR.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfo.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfoList.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/module/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/module/Module.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/DeploymentIterator.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/ScheduleIterator.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/Scheduler.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/SchedulerTask.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/schemaparser/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/schemaparser/SchemaParser.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/service/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/service/Service.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/test/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/test/HotDeploymentTest.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/FaultFlow.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Handler.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/InFlow.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Operation.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/OutFlow.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Parameter.java
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Server.java
Removed:
   webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployement/
Log:
applied patch

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeployCons.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeployCons.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,40 @@
+package org.apache.axis.deployment;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         12:54:57 PM
+ *
+ */
+/**
+ * DeployCons interface is to keep constent value required for Deployemnt
+ */
+public interface DeployCons {
+    int SERVICE = 0; // if it is a servise
+    int MODULE = 1; // if it is a module
+
+    String SERVICEXML = "META-INF/service.xml";
+    String MODULEXML = "META-INF/module.xml";
+    String PARAMETERST = "parameter";// paramater start tag
+    String TYPEMAPPINGST = "typeMapping";// typeMapping start tag
+    String BEANMAPPINGST = "beanMapping";// beanMapping start tag
+    String OPRATIONST = "operation";// operation start tag
+    String INFLOWST = "inflow";// inflow start tag
+    String OUTFLOWST = "outflowr";// outflowr start tag
+    String FAILTFLOWST = "faultflow";// faultflow start tag
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentEngine.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentEngine.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,87 @@
+package org.apache.axis.deployment;
+
+import org.apache.axis.deployment.fileloader.utill.WSInfo;
+import org.apache.axis.deployment.fileloader.utill.UnZipJAR;
+import org.apache.axis.deployment.fileloader.utill.HDFileItem;
+
+import java.util.Vector;
+import java.io.File;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 13, 2004
+ *         12:33:17 PM
+ *
+ */
+public class DeploymentEngine {
+    /**
+     * This will store all the web Services to deploye
+     */
+    private Vector wsToDeploy = new Vector();
+    /**
+     * this will store all the web Services to undeploye
+     */
+    private Vector wsToUnDeploy = new Vector();
+
+
+    public DeploymentEngine() {
+    }
+   /**
+    *
+    * @param file
+    */
+    public void addtowsToDeploy(HDFileItem file){
+        wsToDeploy.add(file);
+    }
+
+    /**
+     *
+     * @param file
+     */
+    public void addtowstoUnDeploy(WSInfo file){
+        wsToUnDeploy.add(file);
+    }
+
+    public void doDeploye(){
+        //todo complete this
+        if(wsToDeploy.size() >0){
+            for (int i = 0; i < wsToDeploy.size(); i++) {
+                HDFileItem fileItem = (HDFileItem) wsToDeploy.elementAt(i);
+                UnZipJAR unZipJAR = new UnZipJAR();
+                unZipJAR.listZipcontent(fileItem.getAbsolutePath());
+               // System.out.println("File" + fileItem.toString());
+
+                System.out.println("\nDeployement WS Name  "  + fileItem.getName());
+            }
+        }
+        wsToDeploy.removeAllElements();
+    }
+
+    public void doUnDeploye(){
+        //todo complete this
+        if(wsToUnDeploy.size()>0){
+            for (int i = 0; i < wsToUnDeploy.size(); i++) {
+                WSInfo wsInfo = (WSInfo) wsToUnDeploy.elementAt(i);
+                System.out.println("UnDeployement WS Name  "  + wsInfo.getFilename());
+            }
+
+        }
+        wsToUnDeploy.removeAllElements();
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentException.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/DeploymentException.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,38 @@
+package org.apache.axis.deployment;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         2:51:57 PM
+ *
+ */
+public class DeploymentException extends Exception{
+    public DeploymentException(Throwable cause) {
+        super(cause);
+    }
+
+    public DeploymentException() {
+    }
+
+    public DeploymentException(String message) {
+        super(message);
+    }
+
+    public DeploymentException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListener.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListener.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,51 @@
+package org.apache.axis.deployment.deployEvents;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         12:00:34 PM
+ *
+ */
+
+/**
+ * WSListener is no listent to a specific folder whether the folder is
+ * update eg: remove , added or modified files
+ */
+public interface WSListener {
+
+    /**
+     * this method is to check whether new module is added (or modules)
+     */
+    void checkModules();
+
+    /**
+     * this method is to check whether new service is added (or services)
+     */
+    void checkServices();
+
+    /**
+     * If new services or modules(service or module) are added then this method will call
+     */
+    void update();
+
+    /**
+     * this is to Initialize the Deployment , this only call when the Axis engine start up
+     * Then it should deploy all the WS and modules , and should initialize the WSInfoList
+     */
+    void init();
+
+}
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListenerImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/deployEvents/WSListenerImpl.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,121 @@
+package org.apache.axis.deployment.deployEvents;
+
+import org.apache.axis.deployment.fileloader.utill.WSInfoList;
+import org.apache.axis.deployment.DeployCons;
+
+import java.util.Vector;
+import java.io.File;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         12:16:19 PM
+ *
+ */
+public class WSListenerImpl implements WSListener, DeployCons{
+
+    /**
+     * to store curreently checking jars
+     */
+    private Vector current_jars;
+    /**
+     * Referance to a WSInfoList
+     */
+    private WSInfoList wsinfoList;
+
+    private String folderName;
+
+    public WSListenerImpl(String folderName) {
+        this.folderName = folderName;
+        wsinfoList = new WSInfoList();
+       // wsinfoList.init();
+        init();
+        //  this.init();
+    }
+
+    public void checkModules() {
+        String modulepath = folderName + "/modules/";
+        searchWS(modulepath, MODULE);
+    }
+
+    public void checkServices() {
+        String modulepath = folderName + "/services/";
+        searchWS(modulepath, SERVICE);
+    }
+
+    public void update() {
+        //todo completet this
+        // this call the update method of WSInfoList
+        wsinfoList.update();
+    }
+
+    /**
+     * all the initialization should come here
+     */
+    public void init() {
+        wsinfoList.init();
+        checkModules();
+        checkServices();
+        update();
+    }
+
+    /**
+     * this is the actual method that is call from scheduler
+     */
+    public void startListent(){
+        checkModules();
+        checkServices();
+        update();
+    }
+
+    /**
+     * This method is to search a given folder  for jar files
+     * and added them to a list wich is in the WSInfolist class
+     */
+    private void searchWS(String folderName, int type) {
+        String files[];
+        current_jars = new Vector();
+        File root = new File(folderName);
+        // adding the root folder to the vector
+        current_jars.addElement(root);
+
+        while (current_jars.size() > 0) {         // loop until empty
+            File dir = (File)current_jars.elementAt(0); // get first dir
+            current_jars.remove(0);       // remove it
+            files = dir.list();              // get list of files
+
+            for (int i = 0; i < files.length ; i++) { // iterate
+                File f = new File(dir, files[i]);
+                if (f.isDirectory()) {        // see if it's a directory
+                    current_jars.insertElementAt(f, 0);
+                } // add dir to start of agenda
+                else if (isJarFile(f.getName())){
+                    wsinfoList.addWSInfoItem(f,type);
+                }
+            }
+        }
+    }
+
+    private boolean isJarFile(String filename) {
+        // to check whether the file is  a jar file
+        if(! filename.endsWith(".jar")){
+            return false;
+        }else
+            return true;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/HDFileItem.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/HDFileItem.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,47 @@
+package org.apache.axis.deployment.fileloader.utill;
+
+import java.io.File;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         2:54:07 PM
+ *
+ */
+
+/**
+ * HDFileItem = Hot Deployment File Item , to store infromation of the module or servise
+ * item to be deploy
+ */
+public class HDFileItem {
+
+    private File file;
+    private int type ;
+
+    public HDFileItem(File file, int type) {
+        this.file = file;
+        this.type = type;
+    }
+
+    public String getName(){
+        return file.getName();
+    }
+
+    public String getAbsolutePath(){
+        return file.getAbsolutePath();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/UnZipJAR.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/UnZipJAR.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,105 @@
+package org.apache.axis.deployment.fileloader.utill;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         2:54:57 PM
+ *
+ */
+
+import org.apache.axis.deployment.DeployCons;
+import org.apache.axis.deployment.schemaparser.SchemaParser;
+
+import java.io.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import java.util.zip.ZipFile;
+import java.util.Enumeration;
+
+public class UnZipJAR implements DeployCons{
+    final int BUFFER = 2048;
+
+    public void listZipcontent(String filename){
+        // get attribute values
+        String strArchive =filename;
+        String tempfile = "C:/tem.txt";
+        ZipInputStream zin;
+        try{
+
+            zin = new ZipInputStream( new FileInputStream(strArchive) ) ;
+            ZipEntry entry ;
+            while ( ( entry = zin.getNextEntry()) != null ) {
+                if(entry.getName().equals(SERVICEXML)){
+                    int BUFFER = 2048;
+                    int count;
+                    byte data[] = new byte[BUFFER];
+                    count = zin.read(data, 0, BUFFER);
+                    InputStream inputStream = new ByteArrayInputStream(data,0,count);
+                    SchemaParser schme = new SchemaParser(inputStream);
+                    schme.parseXML();
+                }
+            }
+            zin.closeEntry() ;
+            zin.close()    ;
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+    }
+
+
+    public void listzip(String filename){
+        int BUFFER = 2048;
+        try {
+            BufferedOutputStream dest = null;
+            BufferedInputStream is = null;
+            ZipEntry entry;
+            ZipFile zipfile = new ZipFile(filename);
+            Enumeration e = zipfile.entries();
+            while(e.hasMoreElements()) {
+                entry = (ZipEntry) e.nextElement();
+                System.out.println("Extracting: " +entry);
+                is = new BufferedInputStream
+                        (zipfile.getInputStream(entry));
+                int count;
+                byte data[] = new byte[BUFFER];
+                FileOutputStream fos = new
+                        FileOutputStream(entry.getName());
+                dest = new
+                        BufferedOutputStream(fos, BUFFER);
+                while ((count = is.read(data, 0, BUFFER))
+                        != -1) {
+                    dest.write(data, 0, count);
+                }
+                dest.flush();
+                dest.close();
+                is.close();
+            }
+        } catch(Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}
+
+
+
+
+
+
+
+

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfo.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfo.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,60 @@
+package org.apache.axis.deployment.fileloader.utill;
+
+import java.io.File;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 13, 2004
+ *         12:06:31 PM
+ *
+ */
+public class WSInfo {
+
+    private String filename;
+    private long lastmodifieddate;
+    /**
+     * To check whether the file is a module or a servise
+     */
+    private int type;
+
+    public WSInfo(String filename, long lastmodifieddate) {
+        this.filename = filename;
+        this.lastmodifieddate = lastmodifieddate;
+    }
+
+    public WSInfo(String filename, long lastmodifieddate, int type) {
+        this.filename = filename;
+        this.lastmodifieddate = lastmodifieddate;
+        this.type = type;
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename;
+    }
+
+    public long getLastmodifieddate() {
+        return lastmodifieddate;
+    }
+
+    public void setLastmodifieddate(long lastmodifieddate) {
+        this.lastmodifieddate = lastmodifieddate;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfoList.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/fileloader/utill/WSInfoList.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,173 @@
+package org.apache.axis.deployment.fileloader.utill;
+
+import org.apache.axis.deployment.DeploymentEngine;
+import org.apache.axis.deployment.DeployCons;
+
+import java.util.Iterator;
+import java.util.Vector;
+import java.io.File;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 13, 2004
+ *         12:13:11 PM
+ *
+ */
+public class WSInfoList implements DeployCons{
+    /**
+     * This is to store all the jar files in a specified folder (WEB_INF)
+     */
+    private static Vector jarlist = new Vector() ;
+    public Vector currentjars = new Vector();
+
+    private DeploymentEngine deplorer;
+
+    public WSInfoList() {
+        deplorer = new DeploymentEngine();
+    }
+
+    public static Vector getJarlist() {
+        return jarlist;
+    }
+
+    /**
+     * This method is used to initialize the vector
+     */
+    public void init(){
+        jarlist.removeAllElements();
+    }
+
+    public void addWSInfoItem(File file , int type){
+        switch(type){
+            case SERVICE: {
+                if(! isFileExist(file.getName())){
+                    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
+                }else{
+                    WSInfo tempWSInfo = getFileItem(file.getName());
+                    if(isModified(file ,tempWSInfo)){
+                        tempWSInfo.setLastmodifieddate(file.lastModified());
+                        WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(),tempWSInfo.getLastmodifieddate(),SERVICE);
+                        deplorer.addtowstoUnDeploy(wsInfo);
+                        HDFileItem hdFileItem = new HDFileItem(file,SERVICE);
+                        deplorer.addtowsToDeploy(hdFileItem);
+
+                    }
+                }
+            }
+            case  MODULE :{
+                if(! isFileExist(file.getName())){
+                    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
+                }else{
+                    WSInfo tempWSInfo = getFileItem(file.getName());
+                    if(isModified(file ,tempWSInfo)){
+                        tempWSInfo.setLastmodifieddate(file.lastModified());
+                        WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(),tempWSInfo.getLastmodifieddate(),MODULE);
+                        deplorer.addtowstoUnDeploy(wsInfo);
+                        HDFileItem hdFileItem = new HDFileItem(file,MODULE);
+                        deplorer.addtowsToDeploy(hdFileItem);
+
+                    }
+                }
+            }
+        }
+        String jarname= file.getName();
+        currentjars.add(jarname);
+    }
+
+    public WSInfo getFileItem(String filename){
+        int sise = jarlist.size();
+        for (int i = 0; i < sise; i++) {
+            WSInfo wsInfo = (WSInfo) jarlist.elementAt(i);
+            if(wsInfo.getFilename().equals(filename)){
+                return wsInfo;
+            }
+        }
+        return null;
+    }
+
+    public boolean isModified(File file , WSInfo wsInfo ){
+        if(wsInfo.getLastmodifieddate() != file.lastModified() ){
+            return true;
+        }
+        return false;
+    }
+
+    public boolean isFileExist(String filename){
+        if(getFileItem(filename)== null){
+            return false;
+        }else
+            return true;
+    }
+
+    /**
+     * this is to check , undeploye WS
+     */
+    public void checkForUndeploye(){
+        Iterator iter = jarlist.listIterator();
+        int size = currentjars.size();
+        Vector tempvector = new Vector();
+        tempvector.removeAllElements();
+        String  filename ="";
+        boolean exist = false;
+        try{
+            while (iter.hasNext()) {
+                WSInfo fileitem = (WSInfo) iter.next();
+                exist = false;
+                for (int i = 0; i < size; i++) {
+                    filename = (String) currentjars.elementAt(i);
+                    if(filename.equals(fileitem.getFilename())){
+                        exist = true;
+                        break;
+                    }
+                }
+
+                if(! exist){
+                    tempvector.add(fileitem);
+                    WSInfo wsInfo = new WSInfo(fileitem.getFilename(),fileitem.getLastmodifieddate()) ;
+                    deplorer.addtowstoUnDeploy(wsInfo);//this is to be undeploye
+                }
+
+            }
+        }catch(Exception e){
+            //todo handle exc
+        }
+
+        for (int i = 0; i < tempvector.size(); i++) {
+            WSInfo fileItem = (WSInfo) tempvector.elementAt(i);
+            jarlist.removeElement(fileItem);
+        }
+        tempvector.removeAllElements();
+        currentjars.removeAllElements();
+    }
+
+    /**
+     *
+     */
+    public void update(){
+        checkForUndeploye();
+        deplorer.doUnDeploye();
+        deplorer.doDeploye();
+
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/module/Module.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/module/Module.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,58 @@
+package org.apache.axis.deployment.module;
+
+import org.apache.axis.deployment.util.Parameter;
+
+import java.util.Vector;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         3:14:40 PM
+ *
+ */
+
+/**
+ * Either Desirialization of module.xml or <module>...</module> element
+ * in service.xml
+ */
+public class Module {
+
+    private String ref;
+    private Vector parameters = new Vector();
+
+    public Module() {
+        //just to clear the vector
+        parameters.removeAllElements();
+    }
+
+    public String getRef() {
+        return ref;
+    }
+
+    public void setRef(String ref) {
+        this.ref = ref;
+    }
+
+    public void addParameter(Parameter parameter){
+        parameters.add(parameter);
+    }
+
+    public Parameter getParameter(int index){
+        return (Parameter)parameters.get(index);
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/DeploymentIterator.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/DeploymentIterator.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,60 @@
+package org.apache.axis.deployment.scheduler;
+
+import java.util.Date;
+import java.util.Calendar;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         9:36:14 AM
+ *
+ */
+public class DeploymentIterator implements ScheduleIterator{
+
+    private int hourOfDay =0;
+    private int minute =0 ;
+    private int second = 0;
+
+    private Calendar calendar = Calendar.getInstance();
+    private Date date = new Date();
+
+    public DeploymentIterator(int hourOfDay, int minute, int second) {
+        this(hourOfDay, minute, second, new Date());
+    }
+
+    public DeploymentIterator(int hourOfDay, int minute, int second, Date date){
+        this.hourOfDay = hourOfDay;
+        this.minute = minute;
+        this.second = second;
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
+        calendar.set(Calendar.MINUTE, minute);
+        calendar.set(Calendar.SECOND, second);
+        calendar.set(Calendar.MILLISECOND, 0);
+        if (!calendar.getTime().before(date)) {
+            // calendar.add(Calendar.MINUTE, -1);
+            calendar.add(Calendar.SECOND, -10);
+        }
+    }
+
+    public Date next() {
+        // calendar.add(Calendar.MINUTE, 1);
+        calendar.add(Calendar.SECOND, 10);
+        return calendar.getTime();
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/ScheduleIterator.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/ScheduleIterator.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,29 @@
+package org.apache.axis.deployment.scheduler;
+
+import java.util.Date;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         9:33:31 AM
+ *
+ */
+public interface ScheduleIterator {
+
+    public Date next();
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/Scheduler.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/Scheduler.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,110 @@
+package org.apache.axis.deployment.scheduler;
+
+import java.util.Timer;
+import java.util.Date;
+import java.util.TimerTask;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         9:48:42 AM
+ *
+ */
+public class Scheduler {
+
+    public class SchedulerTimerTask extends TimerTask {
+        private SchedulerTask schedulerTask;
+        private ScheduleIterator iterator;
+        public SchedulerTimerTask(SchedulerTask schedulerTask,
+                                  ScheduleIterator iterator) {
+            this.schedulerTask = schedulerTask;
+            this.iterator = iterator;
+        }
+        public void run() {
+            schedulerTask.run();
+            reschedule(schedulerTask, iterator);
+        }
+    }
+
+
+    private final Timer timer = new Timer();
+
+    public Scheduler() {
+    }
+
+    /**
+     * Terminates this <code>scheduler</code>, discarding any currently scheduled tasks.
+     * Does not interfere with a currently executing task (if it exists).
+     * Once a scheduler has been terminated, its execution thread terminates gracefully,
+     * and no more tasks may be scheduled on it.
+     * Note that calling this method from within the run method of a scheduler task that
+     * was invoked by this scheduler absolutely guarantees that the ongoing task execution is the last
+     * task execution that will ever be performed by this scheduler.
+     * This method may be called repeatedly; the second and subsequent calls have no effect.
+     */
+
+    public void cancel() {
+        timer.cancel();
+    }
+
+    /**
+     * Schedules the specified task for execution according to the specified schedule.
+     * If times specified by the <code>ScheduleIterator</code> are in the past they are
+     * scheduled for immediate execution.
+     * @param schedulerTask task to be scheduled
+     * @param iterator iterator that describes the schedule
+     * @throws IllegalStateException if task was already scheduled or cancelled,
+     * scheduler was cancelled, or scheduler thread terminated.
+     */
+
+    public void schedule(SchedulerTask schedulerTask,
+                         ScheduleIterator iterator) {
+
+        Date time = iterator.next();
+        if (time == null) {
+            schedulerTask.cancel();
+        } else {
+            synchronized(schedulerTask.lock) {
+                if (schedulerTask.state != SchedulerTask.VIRGIN) {
+                    throw new IllegalStateException("Task already scheduled " +
+                            "or cancelled");
+                }
+                schedulerTask.state = SchedulerTask.SCHEDULED;
+                schedulerTask.timerTask =
+                        new SchedulerTimerTask(schedulerTask, iterator);
+                timer.schedule(schedulerTask.timerTask, time);
+            }
+        }
+    }
+
+    private void reschedule(SchedulerTask schedulerTask,
+                            ScheduleIterator iterator) {
+
+        Date time = iterator.next();
+        if (time == null) {
+            schedulerTask.cancel();
+        } else {
+            synchronized(schedulerTask.lock) {
+                if (schedulerTask.state != SchedulerTask.CANCELLED) {
+                    schedulerTask.timerTask =
+                            new SchedulerTimerTask(schedulerTask, iterator);
+                    timer.schedule(schedulerTask.timerTask, time);
+                }
+            }
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/SchedulerTask.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/scheduler/SchedulerTask.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,96 @@
+package org.apache.axis.deployment.scheduler;
+
+import org.apache.axis.deployment.deployEvents.WSListener;
+import org.apache.axis.deployment.deployEvents.WSListenerImpl;
+
+import java.util.TimerTask;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         9:55:11 AM
+ *
+ */
+public class SchedulerTask implements Runnable {
+    final Object lock = new Object();
+
+     private WSListener wsListener;
+
+    int state = VIRGIN;
+    static final int VIRGIN = 0;
+    static final int SCHEDULED = 1;
+    static final int CANCELLED = 2;
+
+    TimerTask timerTask;
+
+    /**
+     * Creates a new scheduler task.
+     */
+
+    public SchedulerTask() {
+          String filename = "D:/Axis 2.0/projects/Deployement/test-data" ;
+  //  private  FilesLoader filesLoader = new FilesLoader(filename);
+     wsListener= new WSListenerImpl(filename);
+    }
+
+    /**
+     * The action to be performed by this scheduler task.
+     */
+
+    public void run(){
+        soundAlarm();
+    }
+
+    private void soundAlarm() {
+          ((WSListenerImpl)wsListener).startListent();
+        //filesLoader.searchFolder();
+    }
+
+    /**
+     * Cancels this scheduler task.
+     * <p>
+     * This method may be called repeatedly; the second and subsequent calls have no effect.
+     * @return true if this task was already scheduled to run
+     */
+
+    public boolean cancel() {
+        synchronized(lock) {
+            if (timerTask != null) {
+                timerTask.cancel();
+            }
+            boolean result = (state == SCHEDULED);
+            state = CANCELLED;
+            return result;
+        }
+    }
+
+    /**
+     * Returns the <i>scheduled</i> execution time of the most recent actual execution of this task.
+     *  (If this method is invoked while task execution is in progress, the return value is the
+     * scheduled execution time of the ongoing task execution.)
+     * @return the time at which the most recent execution of this task was scheduled to occur,
+     * in the format returned by <code>Date.getTime()</code>. The return value is
+     * undefined if the task has yet to commence its first execution.
+     */
+
+    public long scheduledExecutionTime() {
+        synchronized(lock) {
+            return timerTask == null ? 0 : timerTask.scheduledExecutionTime();
+        }
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/schemaparser/SchemaParser.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/schemaparser/SchemaParser.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,719 @@
+package org.apache.axis.deployment.schemaparser;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+import org.xmlpull.mxp1.MXParserFactory;
+import org.apache.axis.deployment.DeploymentException;
+import org.apache.axis.deployment.DeployCons;
+import org.apache.axis.deployment.module.Module;
+import org.apache.axis.deployment.util.*;
+import org.apache.axis.deployment.service.Service;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 19, 2004
+ *         11:41:32 AM
+ *
+ */
+
+
+/**
+ * This class is used to parse the following xml douments
+ * 1 server.xml
+ * 2 service.xml
+ * 3 module.xml
+ *
+ * this class implements DeployCons to get some constant values need to
+ * parse a given document
+ */
+public class SchemaParser implements DeployCons{
+    //server.xml starting tag
+    private static final String serverXMLST = "server";
+    //module.xml strating tag
+    private static final String moduleXMLST = "module";
+    // service.xml strating tag
+    private static final String serviceXMLST = "service";
+    //to get the input stream
+    private InputStream inputStream;
+    // Referance to XMLPullPasrser
+    private XmlPullParser pullparser;
+
+
+    public SchemaParser(InputStream inputStream) {
+        this.inputStream = inputStream;
+        try{
+            XmlPullParserFactory xmlPullParserFactory = MXParserFactory.newInstance();
+            xmlPullParserFactory.setNamespaceAware(true);
+            pullparser = xmlPullParserFactory.newPullParser();
+            pullparser.setInput(new InputStreamReader(inputStream));
+        }catch(Exception e){
+            //todo handle this exception in good manner
+            e.printStackTrace();
+        }
+
+    }
+
+
+    public void parseXML() throws DeploymentException{
+        //To check whether document end tag has encountered
+        boolean END_DOCUMENT = false;
+
+        try{
+            while (! END_DOCUMENT) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    END_DOCUMENT = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+                    processStartElement();
+                    break;//todo this has to be chenfed only for testng
+                }else if (eventType==XmlPullParser.END_TAG){
+                    // procesEndElement();
+                }else if (eventType==XmlPullParser.CDSECT){
+                    // processCDATA();
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // processComment();
+                }else if (eventType==XmlPullParser.TEXT){
+                    // if the event is not white space processText will invoke
+                    //  if(! pullparser.isWhitespace())
+                    //  processText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+    }
+
+
+    private void processStartElement(){
+        String ST = pullparser.getName();
+        try{
+            if(ST.equals(serviceXMLST)){
+                Service service= procesServiceXML();
+                service.prinData();
+            }
+
+        }catch(Exception e){
+            System.out.println("Exception occure");
+            e.printStackTrace();
+        }
+
+    }
+
+    /**
+     * To process server.xml
+     */
+    private void procesServerXML(){
+        String name = pullparser.getName();
+        String namspace = pullparser.getNamespace();
+        System.out.println( name  + namspace);
+        int attribCount =  pullparser.getAttributeCount();
+        if(attribCount > 0){
+            for (int i = 0; i < attribCount; i++) {
+                String attname = pullparser.getAttributeName(i);
+                String attprifix = pullparser.getAttributePrefix(i);
+                String attnamespace = pullparser.getAttributeNamespace(i);
+                String attvalue = pullparser.getAttributeValue(i);
+                System.out.println(attname + attprifix + "="  +  attnamespace + attvalue);
+
+            }
+        }
+    }
+
+    /**
+     * to process service.xml
+     */
+    private Service procesServiceXML()throws DeploymentException{
+        int attribCount =  pullparser.getAttributeCount();
+        Service service = new Service();
+        if(attribCount == 3){
+            for (int i = 0; i < attribCount; i++) {
+                String attname = pullparser.getAttributeName(i);
+                String attprifix = pullparser.getAttributePrefix(i);
+                String attnamespace = pullparser.getAttributeNamespace(i); // attprifix is same as attval
+                String attvalue = pullparser.getAttributeValue(i);
+                if(attname.equals(Service.PROVIDERNAME)){
+                    service.setProvider(getValue(attvalue));
+                } else if(attname.equals(Service.STYLENAME)){
+                    service.setStyle(getValue(attvalue));
+                } else if(attname.equals(Service.CONTEXTPATHNAME)){
+                    service.setContextPath(getValue(attvalue));
+                } else {
+                    throw new DeploymentException("Bad arguments");
+                }
+            }
+        }else
+            throw new DeploymentException("Bad arguments");
+
+        //*********************************************************************************************//
+        // This is to process remainng part of the document
+        /**
+         * to check whether the End tage of the document has met
+         */
+        boolean END_DOCUMENT = false;
+        try{
+            while (! END_DOCUMENT) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    END_DOCUMENT = true;
+                    break;
+                }else if (eventType==XmlPullParser.START_TAG){
+                    String ST = pullparser.getName(); //Staring tag name
+                    if(ST.equals(PARAMETERST)){
+                        Parameter parameter=processParameter();
+                        service.appParameter(parameter);
+                    } else if(ST.equals(TYPEMAPPINGST)){
+                        processTypeMapping();
+                    } else if(ST.equals(BEANMAPPINGST)){
+                        processBeanMapping();
+                    } else if(ST.equals(OPRATIONST)){
+                        Operation operation =  processOperation();
+                        service.setOperation(operation);
+                    } else if(ST.equals(INFLOWST)){
+                        InFlow inFlow = processInFlow();
+                        service.setInFlow(inFlow);
+                    } else if(ST.equals(OUTFLOWST)){
+                        OutFlow outFlow = processOutFlow() ;
+                        service.setOutFlow(outFlow);
+                    } else if(ST.equals(FAILTFLOWST)){
+                        FaultFlow faultFlow = processFaultFlow();
+                        service.setFaultFlow(faultFlow);
+                    }
+                }else if (eventType==XmlPullParser.END_TAG){
+                    // this wont meet here :)
+                    // and to be removed
+                }else if (eventType==XmlPullParser.CDSECT){
+                    // I think it is not need to support this
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // I think it is not need to support this
+                }else if (eventType==XmlPullParser.TEXT){
+                    // this wont meet here :)
+                    // and to be removed
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+        return service;
+    }
+
+    /**
+     * This will process the <Parameter>....</Parameter> tag and craete a
+     * Parameter object using those values
+     * @return  Parameter
+     * @throws DeploymentException
+     */
+    private Parameter processParameter()throws DeploymentException{
+        String name = pullparser.getName();
+        Parameter parameter = new Parameter(name);
+        int attribCount =  pullparser.getAttributeCount();
+        if(attribCount == 2){  // there should be two attributes
+            for (int i = 0; i < attribCount; i++) {
+                String attname = pullparser.getAttributeName(i);
+                String attprifix = pullparser.getAttributePrefix(i);
+                String attnamespace = pullparser.getAttributeNamespace(i); // attprifix is same as attval
+                String attvalue = pullparser.getAttributeValue(i);
+                if(attname.equals(Parameter.ATTNAME)){
+                    parameter.setName(attvalue);
+                } else if(attname.equals(Parameter.ATTLOCKED)){
+                    String boolval = getValue(attvalue);
+                    if(boolval.equals("true")){
+                        parameter.setLocked(true);
+                    }else if(boolval.equals("false")){
+                        parameter.setLocked(false);
+                    }
+                }
+
+            }
+        } else{
+            throw new DeploymentException("bad parameter arguments");
+        }
+
+        boolean END_PARAMETER = false;
+        String element = ""; // to store the paramater elemnt
+        //todo this should change to support xsdany
+        try{
+            while (! END_PARAMETER) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_PARAMETER = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(PARAMETERST)){
+                        END_PARAMETER = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    element = element + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+        // adding element to the parameter
+        parameter.setElement(element);
+        return parameter;
+    }
+
+    /**
+     * This method used to process the <typeMapping>..</typeMapping> tag
+     * in the service.xml
+     * @throws DeploymentException
+     */
+    public void  processTypeMapping()throws DeploymentException{
+        //todo complete this method
+        // and modify to return a type mapping object
+        boolean END_TYPEMAPPING = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_TYPEMAPPING) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_TYPEMAPPING = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(TYPEMAPPINGST)){
+                        END_TYPEMAPPING = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+    }
+
+
+    private Operation processOperation()throws DeploymentException{
+        String name = pullparser.getName();
+        Operation  operation = new Operation();
+        int attribCount =  pullparser.getAttributeCount();
+        if(attribCount == 4){  // there should be two attributes
+            for (int i = 0; i < attribCount; i++) {
+                String attname = pullparser.getAttributeName(i);
+                String attprifix = pullparser.getAttributePrefix(i);
+                String attnamespace = pullparser.getAttributeNamespace(i); // attprifix is same as attval
+                String attvalue = pullparser.getAttributeValue(i);
+                if(attname.equals(Operation.ATNAME)){
+                    operation.setName(attvalue);
+                } else if(attname.equals(Operation.ATQNAME)){
+                    operation.setQname(attvalue);
+                } else if(attname.equals(Operation.ATSTYLE)){
+                    operation.setStyle(attvalue);
+                } else if(attname.equals(Operation.ATUSE)){
+                    operation.setUse(attvalue);
+                }
+            }
+        } else{
+            throw new DeploymentException("bad parameter arguments");
+        }
+
+        boolean END_OPERATION = false;
+        String text = ""; // to store the paramater elemnt
+        //todo this should change to support xsdany
+        try{
+            while (! END_OPERATION) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_OPERATION = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+                    String ST = pullparser.getName();
+                    if(ST.equals(moduleXMLST)){
+                        Module module= processModule();
+                        operation.setModule(module);
+                    } else if(ST.equals(FAILTFLOWST)){
+                        FaultFlow faultFlow = processFaultFlow();
+                        operation.setFaultFlow(faultFlow);
+                    }else if(ST.equals(INFLOWST)){
+                        InFlow inFlow = processInFlow();
+                        operation.setInFlow(inFlow);
+                    } else if(ST.equals(OUTFLOWST)){
+                        OutFlow outFlow = processOutFlow();
+                        operation.setOutFlow(outFlow);
+                    }
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(OPRATIONST)){
+                        END_OPERATION = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+
+        return operation;
+    }
+
+
+
+    /**
+     * This method used to process the <typeMapping>..</typeMapping> tag
+     * in the service.xml
+     * @throws DeploymentException
+     */
+    public void  processBeanMapping()throws DeploymentException{
+        //todo complete this method
+        // and modify to return a type mapping object
+        boolean END_BEANMAPPING = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_BEANMAPPING) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_BEANMAPPING = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(BEANMAPPINGST)){
+                        END_BEANMAPPING = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+    }
+
+    public Module processModule() throws DeploymentException{
+        Module module = new Module();
+        int attribCount =  pullparser.getAttributeCount();
+        if(attribCount == 1){  // there should be two attributes
+            String attname = pullparser.getAttributeName(0);
+            String attprifix = pullparser.getAttributePrefix(0);
+            String attnamespace = pullparser.getAttributeNamespace(0); // attprifix is same as attval
+            String attvalue = pullparser.getAttributeValue(0);
+
+            module.setRef(attvalue);
+
+        } else{
+            throw new DeploymentException("bad parameter arguments");
+        }
+
+        boolean END_MODULE = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_MODULE) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_MODULE = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+                    String ST= pullparser.getName();
+                    if(ST.equals(PARAMETERST)){
+                        Parameter parameter=processParameter();
+                        module.addParameter(parameter);
+                    }
+                    //todo has to be implemnt this
+                    // complete implenatation
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(moduleXMLST)){
+                        END_MODULE = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+
+        return module;
+    }
+
+    public InFlow  processInFlow()throws DeploymentException{
+        InFlow inFlow = new InFlow();
+        boolean END_INFLOW = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_INFLOW) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_INFLOW = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(INFLOWST)){
+                        END_INFLOW = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+
+        return inFlow;
+    }
+
+
+    public OutFlow  processOutFlow()throws DeploymentException{
+        OutFlow outFlow = new OutFlow();
+        boolean END_OUTFLOW = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_OUTFLOW) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_OUTFLOW = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(OUTFLOWST)){
+                        END_OUTFLOW = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+
+        return outFlow;
+    }
+
+
+    public FaultFlow  processFaultFlow()throws DeploymentException{
+        FaultFlow faultFlow = new FaultFlow();
+        boolean END_FAULTFLOW = false;
+        String text = ""; // to store the paramater elemnt
+        try{
+            while (! END_FAULTFLOW) {
+                pullparser.next();
+                int eventType = pullparser.getEventType();
+                if (eventType==XmlPullParser.START_DOCUMENT){
+                    // processStartDocument();
+                }else if (eventType==XmlPullParser.END_DOCUMENT){
+                    // document end tag met , break the loop
+                    // but the doc end tag wont meet here :)
+                    END_FAULTFLOW = true;
+                }else if (eventType==XmlPullParser.START_TAG){
+
+                }else if (eventType==XmlPullParser.END_TAG){
+                    String endtagname = pullparser.getName();
+                    if(endtagname.equals(FAILTFLOWST)){
+                        END_FAULTFLOW = true;
+                        break;
+                    }
+                }else if (eventType==XmlPullParser.CDSECT){
+                    //do nothing
+                }else if (eventType==XmlPullParser.COMMENT){
+                    // do nothing
+                }else if (eventType==XmlPullParser.TEXT){
+                    text = text + pullparser.getText();
+                }else{
+                    throw new UnsupportedOperationException();
+                    //any other events are not interesting :)
+                }
+            }
+        } catch (XmlPullParserException e) {
+            throw new DeploymentException("parser Exception",e);
+        } catch (IOException e) {
+            throw new DeploymentException("IO Exception",e);
+        } catch (Exception e) {
+            throw new DeploymentException("Unknown process Exception",e);
+        }
+
+        return faultFlow;
+    }
+
+
+
+
+    /**
+     * this method is to get the value of attribue
+     * eg xsd:anyVal --> anyVal
+     * @return
+     */
+    private String getValue(String in){
+        char seperator = ':';
+        String value = null;
+        int index = in.indexOf(seperator);
+        if(index > 0 ){
+            value = in.substring(index+1,in.length());
+            return value;
+        }
+        return in;
+    }
+
+    /**
+     * to process either module.xml or module elemnt in the service.xml
+     */
+    private void procesModuleXML(){
+
+    }
+
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/service/Service.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/service/Service.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,131 @@
+package org.apache.axis.deployment.service;
+
+import org.apache.axis.deployment.util.*;
+
+import java.io.InputStream;
+import java.util.Vector;
+
+import com.thoughtworks.xstream.XStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         3:10:34 PM
+ *
+ */
+
+
+/**
+ * actual service class which is to deserilize Service.xml
+ */
+public class Service {
+    //TODO Complte this class
+    private Vector parameters = new Vector();
+    private String provider;
+    private String style;
+    private String contextPath;
+
+    // flow objects
+    private OutFlow outFlow;
+    private InFlow inFlow;
+    private FaultFlow faultFlow;
+
+    private Operation operation;
+
+    public Service() {
+        //jsut to clear the vector
+        parameters.removeAllElements();
+    }
+
+    public Operation getOperation() {
+        return operation;
+    }
+
+    public void setOperation(Operation operation) {
+        this.operation = operation;
+    }
+
+    public static String PROVIDERNAME = "provider";
+    public static String STYLENAME = "style";
+
+    public OutFlow getOutFlow() {
+        return outFlow;
+    }
+
+    public void setOutFlow(OutFlow outFlow) {
+        this.outFlow = outFlow;
+    }
+
+    public InFlow getInFlow() {
+        return inFlow;
+    }
+
+    public void setInFlow(InFlow inFlow) {
+        this.inFlow = inFlow;
+    }
+
+    public FaultFlow getFaultFlow() {
+        return faultFlow;
+    }
+
+    public void setFaultFlow(FaultFlow faultFlow) {
+        this.faultFlow = faultFlow;
+    }
+
+    public static String CONTEXTPATHNAME = "contextPath";
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+
+    public String getContextPath() {
+        return contextPath;
+    }
+
+    public void setContextPath(String contextPath) {
+        this.contextPath = contextPath;
+    }
+
+    public void appParameter(Parameter parameter){
+        parameters.add(parameter) ;
+    }
+
+    public Parameter getParameter(int index){
+        return (Parameter)parameters.get(index);
+    }
+
+
+
+    public void prinData(){
+        XStream xstream = new XStream();
+        String xml = xstream.toXML(this);
+        System.out.println("Serialization out put \n"  + xml );
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/test/HotDeploymentTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/test/HotDeploymentTest.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,53 @@
+package org.apache.axis.deployment.test;
+
+import org.apache.axis.deployment.scheduler.Scheduler;
+import org.apache.axis.deployment.scheduler.SchedulerTask;
+import org.apache.axis.deployment.scheduler.DeploymentIterator;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 5, 2004
+ *         9:43:39 AM
+ *
+ */
+public class HotDeploymentTest {
+    private final Scheduler scheduler = new Scheduler();
+    private final SimpleDateFormat dateFormat =
+            new SimpleDateFormat("dd MMM yyyy HH:mm:ss.SSS");
+    private final int hourOfDay, minute, second;
+
+    public HotDeploymentTest() {
+        Date date = new Date();
+        this.hourOfDay = date.getHours();
+        this.minute = date.getMinutes();
+        this.second = date.getSeconds();
+    }
+
+    public void start() {
+       scheduler.schedule(new SchedulerTask(),new DeploymentIterator(hourOfDay, minute, second));
+    }
+
+    public static void main(String[] args) {
+        HotDeploymentTest alarmClock = new HotDeploymentTest();
+        alarmClock.start();
+    }
+}
+
+

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/FaultFlow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/FaultFlow.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,42 @@
+package org.apache.axis.deployment.util;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 21, 2004
+ *         11:25:45 AM
+ *
+ */
+public class FaultFlow {
+    private Handler [] handlers;
+    private int handlercount =0;
+
+    /**
+     *
+     * @param handler
+     */
+    public void addHandler(Handler handler){
+        handlers[handlercount]=handler;
+        handlercount++;
+    }
+
+    public Handler getHandler(int index){
+        if(index <= handlercount ){
+            return handlers[index];
+        } else
+            return null;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Handler.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Handler.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,62 @@
+package org.apache.axis.deployment.util;
+
+import org.apache.axis.deployment.DeploymentException;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         3:16:17 PM
+ *
+ */
+public class Handler {
+
+    private String name;
+    private String type;
+    private Parameter [] parameters;
+
+    private int count = 0;  // to keep the number of parameters
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void addParameter(Parameter parameter){
+        parameters[count]= parameter;
+        count ++;
+    }
+
+    public Parameter getParameter(int index){
+        if(index < count){
+            return  parameters[index] ;
+        }
+        else {
+            return null;
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/InFlow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/InFlow.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,42 @@
+package org.apache.axis.deployment.util;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 21, 2004
+ *         11:25:27 AM
+ *
+ */
+public class InFlow {
+    private Handler [] handlers;
+    private int handlercount =0;
+
+    /**
+     *
+     * @param handler
+     */
+    public void addHandler(Handler handler){
+        handlers[handlercount]=handler;
+        handlercount++;
+    }
+
+    public Handler getHandler(int index){
+        if(index <= handlercount ){
+            return handlers[index];
+        } else
+            return null;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Operation.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Operation.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,108 @@
+package org.apache.axis.deployment.util;
+
+import org.apache.axis.deployment.module.Module;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 21, 2004
+ *         11:47:20 AM
+ *
+ */
+
+/**
+ * Opeartion
+ */
+public class Operation {
+
+    public static String ATNAME = "name";
+    public static String ATQNAME = "name";
+    public static String ATSTYLE = "name";
+    public static String ATUSE = "name";
+
+    private String name;
+    private String qname;
+    private String style;
+    private String use;
+    private Module module;
+    private InFlow inFlow;
+    private OutFlow outFlow;
+    private FaultFlow faultFlow;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getQname() {
+        return qname;
+    }
+
+    public void setQname(String qname) {
+        this.qname = qname;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+
+    public String getUse() {
+        return use;
+    }
+
+    public void setUse(String use) {
+        this.use = use;
+    }
+
+    public Module getModule() {
+        return module;
+    }
+
+    public void setModule(Module module) {
+        this.module = module;
+    }
+
+    public InFlow getInFlow() {
+        return inFlow;
+    }
+
+    public void setInFlow(InFlow inFlow) {
+        this.inFlow = inFlow;
+    }
+
+    public OutFlow getOutFlow() {
+        return outFlow;
+    }
+
+    public void setOutFlow(OutFlow outFlow) {
+        this.outFlow = outFlow;
+    }
+
+    public FaultFlow getFaultFlow() {
+        return faultFlow;
+    }
+
+    public void setFaultFlow(FaultFlow faultFlow) {
+        this.faultFlow = faultFlow;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/OutFlow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/OutFlow.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,42 @@
+package org.apache.axis.deployment.util;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 21, 2004
+ *         11:25:37 AM
+ *
+ */
+public class OutFlow {
+    private Handler [] handlers;
+    private int handlercount =0;
+
+    /**
+     *
+     * @param handler
+     */
+    public void addHandler(Handler handler){
+        handlers[handlercount]=handler;
+        handlercount++;
+    }
+
+    public Handler getHandler(int index){
+        if(index <= handlercount ){
+            return handlers[index];
+        } else
+            return null;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Parameter.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Parameter.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,65 @@
+package org.apache.axis.deployment.util;
+
+import org.w3c.dom.Document;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         3:12:24 PM
+ *
+ */
+public class Parameter {
+
+    private String name;
+    private boolean locked;
+    private String element;
+
+    public static String ATTNAME ="name";
+    public static String ATTLOCKED ="locked";
+
+    public Parameter() {
+    }
+
+    public Parameter(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isLocked() {
+        return locked;
+    }
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
+    public String getElement() {
+        return element;
+    }
+
+    public void setElement(String element) {
+        this.element = element;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Server.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/deepal/deployment/src/org/apache/axis/deployment/util/Server.java	Thu Oct 21 14:49:27 2004
@@ -0,0 +1,63 @@
+package org.apache.axis.deployment.util;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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
+ *         Oct 18, 2004
+ *         4:18:09 PM
+ *
+ */
+public class Server {
+
+    private String name;
+    private Parameter [] parameters;
+    private Handler [] handlers;
+
+    private int parameterCount = 0 ;
+    private int handlerCount = 0 ;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void appParameter(Parameter parameter){
+        parameters[parameterCount]= parameter;
+        parameterCount ++;
+    }
+
+    public Parameter getParameter(int index){
+        if(index <= parameterCount ){
+            return parameters[index];
+        }else
+            return null;
+    }
+
+    public void addHandlers(Handler handler){
+        handlers[handlerCount] = handler;
+        handlerCount ++;
+    }
+
+    public Handler getHandler(int index){
+        if(index <=handlerCount){
+            return handlers[index];
+        }else
+            return null;
+    }
+}