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 he...@apache.org on 2004/12/10 10:02:04 UTC

svn commit: r111486 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/deployment java/org/apache/axis/deployment/repository/utill java/org/apache/axis/description test/org/apache/axis/description test/org/apache/axis/engine test/org/apache/axis/misc test/org/apache/axis/registry

Author: hemapani
Date: Fri Dec 10 01:02:00 2004
New Revision: 111486

URL: http://svn.apache.org/viewcvs?view=rev&rev=111486
Log:
add a test case to  Registry and fix few bugs
Added:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/EchoService.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java
Removed:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Utils.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/registry/
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java	Fri Dec 10 01:02:00 2004
@@ -1,8 +1,22 @@
 package org.apache.axis.deployment;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
 import org.apache.axis.context.MessageContext;
-import org.apache.axis.deployment.metadata.*;
+import org.apache.axis.deployment.metadata.FlowMetaData;
 import org.apache.axis.deployment.metadata.HandlerMetaData;
+import org.apache.axis.deployment.metadata.ModuleMetaData;
+import org.apache.axis.deployment.metadata.ServerMetaData;
 import org.apache.axis.deployment.metadata.phaserule.PhaseException;
 import org.apache.axis.deployment.repository.utill.HDFileItem;
 import org.apache.axis.deployment.repository.utill.UnZipJAR;
@@ -10,27 +24,18 @@
 import org.apache.axis.deployment.scheduler.DeploymentIterator;
 import org.apache.axis.deployment.scheduler.Scheduler;
 import org.apache.axis.deployment.scheduler.SchedulerTask;
-import org.apache.axis.description.*;
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.Flow;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.engine.Handler;
 import org.apache.axis.impl.description.FlowImpl;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisServiceImpl;
 import org.apache.axis.impl.engine.EngineRegistryImpl;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Vector;
 
 
 /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java	Fri Dec 10 01:02:00 2004
@@ -1,22 +1,27 @@
 package org.apache.axis.deployment;
 
-import org.apache.axis.deployment.metadata.*;
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.deployment.metadata.ModuleMetaData;
+import org.apache.axis.deployment.metadata.ServerMetaData;
 import org.apache.axis.deployment.metadata.phaserule.PhaseException;
 import org.apache.axis.deployment.metadata.phaserule.PhaseMetaData;
-import org.apache.axis.description.*;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.description.Flow;
 import org.apache.axis.description.HandlerMetaData;
+import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.FlowImpl;
 import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.SimpleJavaProvider;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.swing.text.Style;
-import java.io.InputStream;
 
 
 /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java	Fri Dec 10 01:02:00 2004
@@ -21,17 +21,15 @@
  *
  */
 
+import java.io.FileInputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
 import org.apache.axis.deployment.DeploymentConstants;
 import org.apache.axis.deployment.DeploymentEngine;
 import org.apache.axis.deployment.DeploymentParser;
-import org.apache.axis.deployment.metadata.ModuleMetaData;
-import org.apache.axis.deployment.metadata.ServiceMetaData;
-import org.apache.axis.description.AxisService;
 import org.apache.axis.description.AxisModule;
-
-import java.io.FileInputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
+import org.apache.axis.description.AxisService;
 
 public class UnZipJAR implements DeploymentConstants {
     final int BUFFER = 2048;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/AxisGlobal.java	Fri Dec 10 01:02:00 2004
@@ -15,11 +15,17 @@
  */
 package org.apache.axis.description;
 
+import org.apache.axis.impl.description.ParameterIncludeImpl;
+
 /**
  * @author Srinath Perera(hemapani@opensource.lk)
  */
 public class AxisGlobal implements ParameterInclude {
     protected ParameterInclude paramInclude;
+    
+    public AxisGlobal(){
+        paramInclude = new ParameterIncludeImpl();
+    }
     
     public int hashCode() {
         return paramInclude.hashCode();

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/description/Flow.java	Fri Dec 10 01:02:00 2004
@@ -16,7 +16,6 @@
 
 package org.apache.axis.description;
 
-import org.apache.axis.engine.Handler;
 /**
  * Represents logical collection of handlers. The order of Handlers do not have 
  * any symantics.

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/EchoService.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/EchoService.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/EchoService.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,29 @@
+package org.apache.axis.description;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class EchoService {
+    private Log log = LogFactory.getLog(getClass());
+    public void echoVoid(){
+        log.info("echo Service Called");
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.description;
+
+import org.apache.axis.description.Flow;
+import org.apache.axis.engine.EngineUtils;
+import org.apache.axis.impl.description.FlowImpl;
+
+
+public class MockFlow extends FlowImpl implements Flow {
+    public MockFlow(String message, int length) {
+        super();
+        for (int i = 0; i < length; i++) {
+            SpeakingHandler1 h1 = new SpeakingHandler1("Executing " + i + " inside " + message);
+            EngineUtils.addHandler(this,h1);
+        }
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.description;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.impl.description.FlowImpl;
+import org.apache.axis.impl.description.ParameterImpl;
+import org.apache.axis.impl.description.SimpleAxisOperationImpl;
+import org.apache.axis.impl.description.SimpleAxisServiceImpl;
+import org.apache.axis.impl.engine.EngineRegistryImpl;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class RegistryTest extends AbstractTestCase{
+    private EngineRegistry reg;
+    public RegistryTest(String testName) {
+        super(testName);
+    }
+    
+    
+
+    public void testRegistry() throws Exception {
+        AxisGlobal ag = new AxisGlobal();
+        reg = new EngineRegistryImpl(ag);
+        
+        QName moduleName = new QName("module1");
+        AxisModule modlue = new AxisModule(moduleName);
+        reg.addMdoule(modlue);
+        
+        QName serviceName = new QName("service");
+        AxisService service = new SimpleAxisServiceImpl(serviceName);
+        reg.addService(service);       
+        
+        assertSame(modlue,reg.getModule(moduleName));
+        assertSame(service,reg.getService(serviceName));
+        assertSame(ag,reg.getGlobal());
+ 
+    }
+    public void testHandlerMedatata(){
+        HandlerMetaData hmd = new HandlerMetaData();
+        testParameteInClude(hmd);
+    }
+
+    public void testService(){
+        AxisService service = new SimpleAxisServiceImpl(new QName("Service1"));
+        testParameteInClude(service);
+        testFlowIncludeTest(service);
+    }    
+    
+    public void testModule(){
+        AxisModule module = new AxisModule(new QName("module1"));
+        testParameteInClude(module);
+        testFlowIncludeTest(module);
+    }    
+
+    public void testOpeartion(){
+        AxisOperation op = new SimpleAxisOperationImpl(new QName("op"));
+        testParameteInClude(op);
+    }    
+
+
+    public void testParameteInClude(ParameterInclude parmInclude){
+        String key = "value1";
+        Parameter p = new ParameterImpl(key,"value2");
+        parmInclude.addParameter(p);
+        assertEquals(p,parmInclude.getParameter(key));
+    }
+    
+    public void testFlowIncludeTest(FlowInclude flowInclude){
+        Flow flow1 = new FlowImpl();
+        Flow flow2 = new FlowImpl();
+        Flow flow3 = new FlowImpl();
+        
+        flowInclude.setInFlow(flow1);
+        flowInclude.setFaultFlow(flow2);
+        flowInclude.setOutFlow(flow3);
+        assertSame(flow1,flowInclude.getInFlow());
+        assertSame(flow2,flowInclude.getFaultFlow());
+        assertSame(flow3,flowInclude.getOutFlow());
+    }
+    
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.description;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.impl.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SpeakingHandler extends AbstractHandler implements Handler {
+    private Log log = LogFactory.getLog(getClass());
+    private String message;
+    private QName name;
+    public SpeakingHandler() {
+       this.message = "Hi I amtesting ";
+    }
+    public QName getName() {
+        return name;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        log.info("I am " + message + " Handler Running :)");
+    }
+
+    public void revoke(MessageContext msgContext) {
+        log.info("I am " + message + " Handler Running :)");
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.description;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.impl.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SpeakingHandler1  extends AbstractHandler implements Handler {
+    private Log log = LogFactory.getLog(getClass());
+    private String message;
+    private QName name;
+    public SpeakingHandler1(String message) {
+       this.message = message;
+    }
+    public QName getName() {
+        return name;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        log.info("I am " + message + " Handler Running :)");
+    }
+
+    public void revoke(MessageContext msgContext) {
+        log.info("I am " + message + " Handler Running :)");
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java?view=auto&rev=111486
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java	Fri Dec 10 01:02:00 2004
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.description;
+
+import java.lang.reflect.Method;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Provider;
+import org.apache.axis.impl.providers.AbstractProvider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SpeakingProvider extends AbstractProvider implements Provider {
+    private Log log = LogFactory.getLog(getClass());
+    private String message;
+    public SpeakingProvider(){}
+
+
+    public MessageContext invoke(MessageContext msgContext) throws AxisFault {
+        log.info("I am Speaking Provider Running :)");
+        return msgContext;
+    }
+
+    public void revoke(MessageContext msgContext) {
+        log.info("I am Speaking Provider revoking :)");
+    }
+    /* (non-Javadoc)
+     * @see org.apache.axis.engine.AbstractProvider#deserializeParameters(org.apache.axis.engine.MessageContext, java.lang.reflect.Method)
+     */
+    public Object[] deserializeParameters(
+        MessageContext msgContext,
+        Method method)
+        throws AxisFault {
+        return null;
+    }
+
+    public Object getTheImplementationObject(MessageContext msgContext)
+        throws AxisFault {
+        return null;
+    }
+
+    protected Object makeNewServiceObject(
+        MessageContext msgContext)
+        throws AxisFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java	Fri Dec 10 01:02:00 2004
@@ -60,7 +60,7 @@
     }
 
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         AxisService service = new SimpleAxisServiceImpl(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
         Parameter classParam = new ParameterImpl("className",EchoXML.class.getName());

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java	Fri Dec 10 01:02:00 2004
@@ -61,7 +61,7 @@
     }
 
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         
         AxisService service = new SimpleAxisServiceImpl(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java	Fri Dec 10 01:02:00 2004
@@ -51,7 +51,7 @@
     }
 
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         sas = EngineUtils.startServer(engineRegistry);
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java	Fri Dec 10 01:02:00 2004
@@ -43,7 +43,7 @@
         super(arg0);
     }
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         mc = new MessageContext(engineRegistry);
         AxisService service = engineRegistry.getService(serviceName);
         mc.setProperty(MessageContext.REQUEST_URL,"/axis/services/EchoService");

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java	Fri Dec 10 01:02:00 2004
@@ -20,9 +20,19 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.description.AxisOperation;
 import org.apache.axis.description.AxisService;
+import org.apache.axis.description.EchoService;
 import org.apache.axis.description.Flow;
 import org.apache.axis.description.HandlerMetaData;
+import org.apache.axis.description.MockFlow;
+import org.apache.axis.description.Parameter;
+import org.apache.axis.impl.description.ParameterImpl;
+import org.apache.axis.impl.description.SimpleAxisOperationImpl;
+import org.apache.axis.impl.description.SimpleAxisServiceImpl;
+import org.apache.axis.impl.providers.SimpleJavaProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
 
 /**
@@ -78,6 +88,58 @@
 
         EngineUtils.addHandlers(service.getFaultFlow(),faultchain,Constants.PHASE_SERVICE);
         service.setExecutableFaultChain(faultchain);
+    }
+    public static EngineRegistry createMockRegistry(QName serviceName,QName operationName,QName transportName) throws AxisFault{
+        EngineRegistry engineRegistry = null;
+        AxisGlobal global = new AxisGlobal();
+        engineRegistry = new org.apache.axis.impl.engine.EngineRegistryImpl(global);
+        
+
+        
+        AxisService service = new SimpleAxisServiceImpl(serviceName);
+        service.setInFlow(new MockFlow("service inflow",4));
+        service.setOutFlow(new MockFlow("service outflow",5));
+        service.setFaultFlow(new MockFlow("service faultflow",1));
+        service.setClassLoader(Thread.currentThread().getContextClassLoader());
+        
+        Parameter classParam = new ParameterImpl("className",EchoService.class.getName());
+        service.addParameter(classParam);
+         
+        service.setProvider(new SimpleJavaProvider());
+        
+        AxisModule m1 = new AxisModule(new QName("","A Mdoule 1"));
+        m1.setInFlow(new MockFlow("service module inflow",4));
+        m1.setFaultFlow(new MockFlow("service module faultflow",1));
+        service.addModule(m1.getName());
+        
+        AxisOperation operation = new SimpleAxisOperationImpl(operationName);
+        
+        service.addOperation(operation);
+        engineRegistry.addService(service);
+        //create Execution Chains
+        ExecutionChain inchain = new ExecutionChain();
+        inchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        inchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        inchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        EngineUtils.addHandlers(service.getInFlow(),inchain,Constants.PHASE_SERVICE);
+        service.setExecutableInChain(inchain);
+        
+        ExecutionChain outchain = new ExecutionChain();
+        outchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        outchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        outchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        EngineUtils.addHandlers(service.getOutFlow(),outchain,Constants.PHASE_SERVICE);
+        service.setExecutableOutChain(outchain);
+        
+        ExecutionChain faultchain = new ExecutionChain();
+        
+        faultchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        faultchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        faultchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        
+        EngineUtils.addHandlers(service.getFaultFlow(),faultchain,Constants.PHASE_SERVICE);
+        service.setExecutableFaultChain(faultchain);
+        return engineRegistry;
     }
 
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/HandlerFaliureTest.java	Fri Dec 10 01:02:00 2004
@@ -27,6 +27,7 @@
 import org.apache.axis.description.AxisService;
 import org.apache.axis.description.Flow;
 import org.apache.axis.description.Parameter;
+import org.apache.axis.description.SpeakingHandler;
 import org.apache.axis.impl.description.FlowImpl;
 import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
@@ -37,7 +38,6 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.registry.SpeakingHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -66,7 +66,7 @@
     }
 
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
     }
     
     

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java	Fri Dec 10 01:02:00 2004
@@ -56,7 +56,7 @@
     }
 
     protected void setUp() throws Exception {
-        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         AxisService service = new SimpleAxisServiceImpl(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
         Parameter classParam = new ParameterImpl("className",EchoXML.class.getName());

Deleted: /webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Utils.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Utils.java?view=auto&rev=111485
==============================================================================

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java?view=diff&rev=111486&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java&r1=111485&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java&r2=111486
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/misc/MiscTest.java	Fri Dec 10 01:02:00 2004
@@ -17,11 +17,14 @@
 
 import java.lang.reflect.InvocationTargetException;
 
+import javax.xml.namespace.QName;
+
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.context.GlobalContext;
 import org.apache.axis.context.SessionContext;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.impl.context.SimpleSessionContext;
+import org.apache.axis.impl.providers.RawXMLProvider;
 
 /**
  * @author Srinath Perera(hemapani@opensource.lk)
@@ -55,5 +58,12 @@
     public void testAxisFault(){
         Exception e = new InvocationTargetException(new Exception());
         assertNotSame(AxisFault.makeFault(e),e);
+    }
+    
+    public void testProviders(){
+        RawXMLProvider xmlprovider = new RawXMLProvider();
+        QName name = new QName("Hi","testing");
+        xmlprovider.setName(name);
+        assertEquals(xmlprovider.getName(),name);
     }
 }