axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r123272 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/deployment samples/deployment/module1/META-INF samples/deployment/module2/META-INF test-resources/deployment test/org/apache/axis/deployment
Date Fri, 24 Dec 2004 04:28:25 GMT
Author: deepal
Date: Thu Dec 23 20:28:23 2004
New Revision: 123272

URL: http://svn.apache.org/viewcvs?view=rev&rev=123272
Log:
adding testcases
Added:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadServer.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadService.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/Badmodule.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java
Removed:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/module.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/ServiceTest.java
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java
   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/samples/deployment/module1/META-INF/module.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java?view=diff&rev=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java&r2=123272
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentConstants.java
Thu Dec 23 20:28:23 2004
@@ -45,6 +45,7 @@
     String JWS_EXTENSION = ".jws";
 
     String SERVICETAG = "service";
+    String SERVERST = "server";
 
     // for serviemetadat
     String PROVIDERNAME = "provider";

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=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentEngine.java&r2=123272
==============================================================================
--- 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
Thu Dec 23 20:28:23 2004
@@ -1,15 +1,5 @@
 package org.apache.axis.deployment;
 
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Vector;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
 import org.apache.axis.deployment.repository.utill.HDFileItem;
 import org.apache.axis.deployment.repository.utill.UnZipJAR;
 import org.apache.axis.deployment.repository.utill.WSInfo;
@@ -20,7 +10,6 @@
 import org.apache.axis.description.AxisModule;
 import org.apache.axis.description.Flow;
 import org.apache.axis.description.HandlerMetaData;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.engine.Handler;
@@ -31,6 +20,15 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Iterator;
+import java.util.Vector;
+
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -314,20 +312,6 @@
         } catch (ClassNotFoundException e) {
             throw new AxisFault(e.getMessage());
         }
-
-//        try {
-//            Handler handler = (Handler) handlerClass.newInstance();
-//            MessageContext msgContext = null;
-//            try {
-//                handler.invoke(msgContext);
-//            } catch (AxisFault axisFault) {
-//                throw new AxisFault(axisFault.getMessage());
-//            }
-//        } catch (InstantiationException e) {
-//            throw new AxisFault(e.getMessage());
-//        } catch (IllegalAccessException e) {
-//            throw new AxisFault(e.getMessage());
-//        }
         return handlerClass;
     }
 

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=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/DeploymentParser.java&r2=123272
==============================================================================
--- 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
Thu Dec 23 20:28:23 2004
@@ -46,14 +46,12 @@
  * parse a given document
  */
 public class DeploymentParser implements DeploymentConstants {
-    //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;
+    private InputStream inputStream = null;
     // Referance to XMLPullPasrser
 
     // private XmlPullParser pullparser;
@@ -77,27 +75,14 @@
         this.inputStream = inputStream;
         this.dpengine = engine;
         this.archiveName = fileName;
-
-        //   try {
         pullparser = XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
-        //   } catch (XMLStreamException e) {
-        //      e.printStackTrace();  //To change body of catch statement use Options | File
Templates.
-        //  } catch (FactoryConfigurationError factoryConfigurationError) {
-        //     factoryConfigurationError.printStackTrace();  //To change body of catch statement
use Options | File Templates.
-        // }
     }
 
 
     public DeploymentParser(InputStream inputStream, DeploymentEngine engine) throws XMLStreamException
{
         this.inputStream = inputStream;
         this.dpengine = engine;
-        //  try {
         pullparser = XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
-        // } catch (XMLStreamException e) {
-        //    e.printStackTrace();  //To change body of catch statement use Options | File
Templates.
-        // } catch (FactoryConfigurationError factoryConfigurationError) {
-        //    factoryConfigurationError.printStackTrace();  //To change body of catch statement
use Options | File Templates.
-        //}
     }
 
     public void parseServiceXML(AxisService axisService) throws DeploymentException, PhaseException
{
@@ -144,7 +129,7 @@
                         Parameter parameter = processParameter();
                         serverMetaData.addParameter(parameter);
                     } else if (ST.equals(TYPEMAPPINGST)) {
-                        processTypeMapping();
+                       throw new UnsupportedOperationException("Type Mappings are not allowed
in server.xml");
                     } else if (ST.equals(MODULEST)) {
                         int attribCount = pullparser.getAttributeCount();
                         if (attribCount > 0) {
@@ -158,6 +143,10 @@
                         }
                     } else if (ST.equals(PHASE_ORDER)) {
                       ((EngineRegistryImpl)dpengine.getEngineRegistry()).setPhases(processPhaseOrder());
+                    } else if(ST.equals(SERVERST)){
+                         //TODO process attributes
+                    }  else {
+                        throw new UnsupportedOperationException(ST + " element is not allowed
in the server.xml");
                     }
                 }
             }
@@ -219,7 +208,6 @@
                             attribCount = pullparser.getAttributeCount();
                             if (attribCount > 0) {
                                 for (int i = 0; i < attribCount; i++) {
-                                    String attname = pullparser.getAttributeLocalName(i);
                                     String attvalue = pullparser.getAttributeValue(i);
                                     dpengine.getCurrentFileItem().setClassName(attvalue);
                                 }
@@ -276,7 +264,6 @@
 
 
     private Parameter processParameter() throws DeploymentException {
-        String name = pullparser.getLocalName();
         Parameter parameter = new ParameterImpl();
         int attribCount = pullparser.getAttributeCount();
         if (attribCount == 2) {  // there should be two attributes
@@ -619,6 +606,8 @@
                     } else if (ST.equals(OUTFLOWST)) {
                         Flow outFlow = processOutFlow();
                         module.setOutFlow(outFlow);
+                    } else {
+                        throw new UnsupportedOperationException(ST + "elment is not allowed
in module.xml");
                     }
                     //todo has to be implemnt this
                     // complete implenatation

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml?view=diff&rev=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml&r2=123272
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module1/META-INF/module.xml
Thu Dec 23 20:28:23 2004
@@ -2,7 +2,7 @@
     <parameter name="para123" locked="xsd:true">10</parameter>
     <parameter name="para245" locked="xsd:false">Colombo</parameter>
     <!--  Module TypeMapping -->
-    <typeMapping>Type mappping should come here</typeMapping>
+    
     <inflow>
         <handler name="h1" class="org.apache.axis.registry.Handler3">
             <order phase="p1" phaseFirst="true"/>

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml?view=diff&rev=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml&r2=123272
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/module2/META-INF/module.xml
Thu Dec 23 20:28:23 2004
@@ -2,8 +2,7 @@
     <parameter name="para123" locked="xsd:true">10</parameter>
     <parameter name="para245" locked="xsd:false">Colombo</parameter>
     <!--  Module TypeMapping -->
-    <typeMapping>Type mappping should come here</typeMapping>
-<inflow>
+    <inflow>
         <handler name="h1" class="org.apache.axis.registry.Handler4">
             <order phase="p1" phaseFirst="true"/>
             <parameter name="para8" locked="xsd:true">123</parameter>
@@ -11,7 +10,7 @@
             <parameter name="para10" locked="xsd:true">789</parameter>
         </handler>
         <handler name="h2" class="org.apache.axis.registry.Handler4"/>
-     </inflow>
+    </inflow>
 
     <outflow>
         <handler name="h3" class="org.apache.axis.registry.Handler4">
@@ -38,7 +37,7 @@
             <parameter name="para9" locked="xsd:true">456</parameter>
             <parameter name="para10" locked="xsd:true">789</parameter>
         </handler>
-   </faultflow>
+    </faultflow>
 
 
 </module>

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadServer.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadServer.xml?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadServer.xml
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,27 @@
+<server name ="AxisJava2.0" >
+    <parameter name="para1" locked="xsd:true">10</parameter>
+    <parameter name="para2" locked="xsd:false">Colombo</parameter>
+    <handler name="h1" class="org.apache.axis.engine.registry.SpeakingHandler">
+        <order phase="p1" phaseFirst="true"/>
+        <parameter name="para8" locked="xsd:true">123</parameter>
+        <parameter name="para9" locked="xsd:true">456</parameter>
+        <parameter name="para10" locked="xsd:true">789</parameter>
+    </handler>
+    <handler name="h2" class="org.apache.axis.engine.registry.SpeakingHandler"/>
+    <module ref="module1"> </module>
+  <!--
+    <module ref="uri">
+        <parameter name="para3" locked="xsd:true">10</parameter>
+        <parameter name="para4" locked="xsd:false">LSF</parameter>
+    </module>
+   -->
+    <phaseOrder>
+        <phase name="global"/>
+        <phase name="transport"/>
+        <phase name="p2"/>
+        <phase name="p1"/>
+        <phase name="p3"/>
+        <phase name="anyhase"/>
+        <phase name="service"/>
+    </phaseOrder>
+</server>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadService.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadService.xml?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/BadService.xml
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,68 @@
+<service provider="xsd:anyprovider" style="xsd:anyURI" contextPath="xsd:anycontextPath">
+    <!-- these are Service Parameters -->
+    <parameter name="para1" locked="xsd:true">10</parameter>
+    <parameter name="para2" locked="xsd:false">Colombo</parameter>
+
+    <!--  Service TypeMapping -->
+    <typeMapping>Type mappping should come here</typeMapping>
+    <beanMapping>bean mappping should come here</beanMapping>
+
+    <!--
+    Phases
+    P1 p2 p3
+    -->
+
+    <inflow>
+        <handler name="h1" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p1" phaseFirst="true"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+        <handler name="h2" class="org.apache.axis.engine.registry.SpeakingHandler"/>
+    </inflow>
+
+    <outflow>
+        <handler name="h3" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p2"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+        </handler>
+    </outflow>
+
+    <faultflow>
+        <handler name="h4" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+
+        <handler name="h5" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p1"/>
+        </handler>
+
+        <handler name="h6" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="anyhase" phaseFirst="true" phaseLast="false"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+    </faultflow>
+
+
+    <operation name="opname" qname="opqname" style="anyStyle" use="anyUse">
+        <inflow>
+            <handler name="h7" class="org.apache.axis.engine.registry.SpeakingHandler"/>
+        </inflow>
+        <outflow>
+            <handler name="h8" class="org.apache.axis.engine.registry.SpeakingHandler">
+                <order  phase="anyhase" />
+                <parameter name="para8" locked="xsd:true">123</parameter>
+                <parameter name="para9" locked="xsd:true">456</parameter>
+                <parameter name="para10" locked="xsd:true">789</parameter>
+            </handler>
+        </outflow>
+        <faultflow>
+        </faultflow>
+    </operation>
+</service>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/Badmodule.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/Badmodule.xml?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/Badmodule.xml
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,44 @@
+<module name="module1" class="module1.java">
+    <parameter name="para123" locked="xsd:true">10</parameter>
+    <parameter name="para245" locked="xsd:false">Colombo</parameter>
+    <!--  Module TypeMapping -->
+    <typeMapping>Type mappping should come here</typeMapping>
+    <inflow>
+        <handler name="h1" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p1" phaseFirst="true"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+        <handler name="h2" class="org.apache.axis.engine.registry.SpeakingHandler"/>
+    </inflow>
+
+    <outflow>
+        <handler name="h3" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p2"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+        </handler>
+    </outflow>
+
+    <faultflow>
+        <handler name="h4" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+
+        <handler name="h5" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="p1"/>
+        </handler>
+
+        <handler name="h6" class="org.apache.axis.engine.registry.SpeakingHandler">
+            <order phase="anyhase" phaseFirst="true" phaseLast="false"/>
+            <parameter name="para8" locked="xsd:true">123</parameter>
+            <parameter name="para9" locked="xsd:true">456</parameter>
+            <parameter name="para10" locked="xsd:true">789</parameter>
+        </handler>
+    </faultflow>
+
+
+</module>
\ No newline at end of file

Deleted: /webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/module.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/module.xml?view=auto&rev=123271
==============================================================================

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml?view=diff&rev=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml&r2=123272
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/deployment/server.xml
Thu Dec 23 20:28:23 2004
@@ -1,13 +1,6 @@
 <server name ="AxisJava2.0" >
     <parameter name="para1" locked="xsd:true">10</parameter>
     <parameter name="para2" locked="xsd:false">Colombo</parameter>
-    <handler name="h1" class="org.apache.axis.engine.registry.SpeakingHandler">
-        <order phase="p1" phaseFirst="true"/>
-        <parameter name="para8" locked="xsd:true">123</parameter>
-        <parameter name="para9" locked="xsd:true">456</parameter>
-        <parameter name="para10" locked="xsd:true">789</parameter>
-    </handler>
-    <handler name="h2" class="org.apache.axis.engine.registry.SpeakingHandler"/>
     <module ref="module1"> </module>
   <!--
     <module ref="uri">

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,52 @@
+package org.apache.axis.deployment;
+
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.description.AxisGlobal;
+
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+/**
+ * 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.
+ * <p/>
+ * Dec 24, 2004
+ * 10:15:33 AM
+ */
+public class BadModuleTest extends AbstractTestCase {
+    /**
+     * Constructor.
+     */
+    public BadModuleTest(String testName) {
+        super(testName);
+    }
+
+    public void testBadModuleXML()  {
+        try {
+            InputStream in = new FileInputStream(getTestResourceFile("deployment/Badmodule.xml"));
+            DeploymentParser parser = new  DeploymentParser(in, null);
+            AxisGlobal glabl = new AxisGlobal();
+            parser.procesServerXML(glabl);
+            fail("this must failed gracefully with DeploymentException or FileNotFoundException");
+        } catch (FileNotFoundException e) {
+            return;
+        } catch (DeploymentException e) {
+            return;
+        } catch (Exception e) {
+            return ;
+        }
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,53 @@
+package org.apache.axis.deployment;
+
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.description.AxisGlobal;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+/**
+ * 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.
+ * <p/>
+ * Dec 23, 2004
+ * 3:31:59 PM
+ */
+public class BadServerXMLTest extends AbstractTestCase {
+    /**
+     * Constructor.
+     */
+    public BadServerXMLTest(String testName) {
+        super(testName);
+    }
+
+    public void testBadServerXML()  {
+        try {
+            InputStream in = new FileInputStream(getTestResourceFile("deployment/BadServer.xml"));
+            DeploymentParser parser = new  DeploymentParser(in, null);
+            AxisGlobal glabl = new AxisGlobal();
+            parser.procesServerXML(glabl);
+            fail("this must failed gracefully with DeploymentException or FileNotFoundException");
+        } catch (FileNotFoundException e) {
+            return;
+        } catch (DeploymentException e) {
+            return;
+        } catch (Exception e) {
+            return ;
+        }
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,53 @@
+package org.apache.axis.deployment;
+
+import org.apache.axis.description.AxisGlobal;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.impl.description.AxisService;
+
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+/**
+ * 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.
+ * <p/>
+ * Dec 24, 2004
+ * 10:04:12 AM
+ */
+public class BadServiceXMLTest extends AbstractTestCase {
+    /**
+     * Constructor.
+     */
+    public BadServiceXMLTest(String testName) {
+        super(testName);
+    }
+
+    public void testBadServiceXML()  {
+        try {
+            InputStream in = new FileInputStream(getTestResourceFile("deployment/BadService.xml"));
+            DeploymentParser parser = new  DeploymentParser(in, null);
+            AxisService axisService = new AxisService();
+            parser.parseServiceXML(axisService);
+            fail("this must failed gracefully with DeploymentException or FileNotFoundException");
+        } catch (FileNotFoundException e) {
+            return ;
+        } catch (DeploymentException e) {
+            return ;
+        } catch (Exception e) {
+            return ;
+        }
+
+    }
+}

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?view=diff&rev=123272&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java&r1=123271&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java&r2=123272
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
Thu Dec 23 20:28:23 2004
@@ -35,7 +35,7 @@
     }
 
     public void testDeployment() throws Exception{
-        String filename = "./target/test-resources" ;
+        String filename = "./target/test-resources/deployment" ;
         DeploymentEngine deploymentEngine = new DeploymentEngine(filename);
         EngineRegistry er = deploymentEngine.start();
         assertNotNull(er);

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java?view=auto&rev=123272
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java
Thu Dec 23 20:28:23 2004
@@ -0,0 +1,39 @@
+package org.apache.axis.deployment;
+
+import junit.framework.TestCase;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.phaseresolver.PhaseException;
+
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * 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.
+ *
+ */
+public class DeploymentotalTest extends TestCase {
+    EngineRegistry er = null;
+    public void testparseService1() throws PhaseException ,DeploymentException, AxisFault,
XMLStreamException{
+       String filename = "./target/test-resources/deployment" ;
+        DeploymentEngine deploymentEngine = new DeploymentEngine(filename);
+        er = deploymentEngine.start();
+        try {
+            Thread.sleep(11000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+        }
+    }
+
+}

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

Mime
View raw message