You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/06/09 16:56:05 UTC

svn commit: r189760 - in /incubator/beehive/trunk/wsm: drt/ drt/tests/org/apache/beehive/wsm/axis/handlers/ drt/tests/org/apache/beehive/wsm/jsr181/model/ drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/ drt/tests/org/apache/beehive/wsm/jsr181/wsdl/ test/

Author: ekoneil
Date: Thu Jun  9 07:56:04 2005
New Revision: 189760

URL: http://svn.apache.org/viewcvs?rev=189760&view=rev
Log:
Cleanup in the WSM tests in order to get an accurate picture of what is used where.

Removes a bunch of dead imports, etc.

BB: self
DRT: WSM pass


Removed:
    incubator/beehive/trunk/wsm/drt/LICENSE.TXT
    incubator/beehive/trunk/wsm/test/
Modified:
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandlerTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/WSDL2AnnotatedJavaTest.java
    incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandlerTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandlerTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandlerTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandlerTest.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.axis.handlers;
-
 /*
  * Copyright 2001-2004 The Apache Software Foundation.
  * 
@@ -16,6 +14,8 @@
  * limitations under the License.
  * 
  */
+package org.apache.beehive.wsm.axis.handlers;
+
 import junit.framework.TestCase;
 
 import org.apache.axis.Message;
@@ -24,15 +24,7 @@
 import org.apache.axis.message.RPCElement;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.axis.server.AxisServer;
-import org.apache.beehive.wsm.wsdl.WSDLProcessor;
 import org.w3c.dom.Node;
-import org.xmlsoap.schemas.wsdl.DefinitionsDocument;
-import org.xmlsoap.schemas.wsdl.TBinding;
-import org.xmlsoap.schemas.wsdl.TBindingOperation;
-import org.xmlsoap.schemas.wsdl.TDefinitions;
-import org.xmlsoap.schemas.wsdl.TService;
-import org.xmlsoap.schemas.wsdl.soap.TOperation;
-import org.xmlsoap.schemas.wsdl.soap.TStyleChoice;
 
 /**
  * ****************************************************************************
@@ -42,13 +34,8 @@
  *
  * @author Jonathan Colwell
  */
-public class AnnotatedWebServiceDeploymentHandlerTest extends TestCase {
-
-
-
-    public void tearDown() {
-        // empty
-    }
+public class AnnotatedWebServiceDeploymentHandlerTest
+    extends TestCase {
 
     public void testInvokeRPCSOAPService() throws Exception {
 	     final  String classname = "org.apache.beehive.wsm.axis.FakeWebService";   // rpc style web service
@@ -83,8 +70,10 @@
         }
     }
 	
-	   public void testInvokeDOCSOAPService() throws Exception {
-		     final  String classname = "org.apache.beehive.wsm.axis.FakeDocWebService";   // doc style web service
+    public void testInvokeDOCSOAPService()
+        throws Exception {
+
+            final  String classname = "org.apache.beehive.wsm.axis.FakeDocWebService";   // doc style web service
 		    
 		     SOAPService fakeSOAPService;
 	       AnnotatedWebServiceDeploymentHandler hdlr =

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.axis.handlers;
-
 /*
  * Copyright 2001-2004 The Apache Software Foundation.
  * 
@@ -16,13 +14,10 @@
  * limitations under the License.
  * 
  */
-import java.util.Iterator;
-import java.util.List;
+package org.apache.beehive.wsm.axis.handlers;
 
+import java.util.Iterator;
 import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.DetailEntry;
-import org.apache.axis.message.SOAPFault;
 
 import junit.framework.TestCase;
 
@@ -33,33 +28,21 @@
 import org.apache.axis.message.MessageElement;
 import org.apache.axis.message.RPCElement;
 import org.apache.axis.message.SOAPEnvelope;
+import org.apache.axis.message.SOAPFault;
 import org.apache.axis.server.AxisServer;
-import org.apache.beehive.wsm.wsdl.WSDLProcessor;
-import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
-import org.xmlsoap.schemas.wsdl.DefinitionsDocument;
-import org.xmlsoap.schemas.wsdl.TBinding;
-import org.xmlsoap.schemas.wsdl.TBindingOperation;
-import org.xmlsoap.schemas.wsdl.TDefinitions;
-import org.xmlsoap.schemas.wsdl.TService;
-import org.xmlsoap.schemas.wsdl.soap.TOperation;
-import org.xmlsoap.schemas.wsdl.soap.TStyleChoice;
 
 public class FaultTest extends TestCase {
 
-    SOAPService fakeSOAPService;
+    private SOAPService fakeSOAPService;
 
     public void setUp() throws Exception {
         final String classname = "org.apache.beehive.wsm.axis.FakeDocWebService";
         AnnotatedWebServiceDeploymentHandler hdlr = new AnnotatedWebServiceDeploymentHandler();
         Class clazz = Class.forName(classname);
         fakeSOAPService = hdlr.getSOAPService(clazz);
-    }
-
-    public void tearDown() {
-        // empty
     }
 
     public void testSimpleUserDefinedExceptions() throws Exception {

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.jsr181.model;
-
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -17,6 +15,7 @@
  *
  * $Header:$
  */
+package org.apache.beehive.wsm.jsr181.model;
 
 import java.util.Collection;
 

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.jsr181.model;
-
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -17,6 +15,7 @@
  *
  * $Header:$
  */
+package org.apache.beehive.wsm.jsr181.model;
 
 import java.util.Collection;
 

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.jsr181.processor.apt;
-
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -17,18 +15,17 @@
  *
  * $Header:$
  */
-
-import com.sun.tools.apt.Main;
+package org.apache.beehive.wsm.jsr181.processor.apt;
 
 import org.apache.beehive.wsm.jsr181.model.BarTestCase;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 
 /**
  * Test case verifies that a source file can be read and its annotations can be
  * interpreted by the annotation processor.
  */
-public class WsmAnnotationProcessorEndpointInterfaceTest extends BarTestCase {
+public class WsmAnnotationProcessorEndpointInterfaceTest
+    extends BarTestCase {
 
     @Override
     public void setUp() throws Exception {
@@ -38,11 +35,6 @@
         if (null == objectModel) {
             throw new Exception ("No object model found.");
         }
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        // empty
     }
 
     /**

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java Thu Jun  9 07:56:04 2005
@@ -1,5 +1,3 @@
-package org.apache.beehive.wsm.jsr181.processor.apt;
-
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -17,17 +15,17 @@
  *
  * $Header:$
  */
+package org.apache.beehive.wsm.jsr181.processor.apt;
 
-import com.sun.tools.apt.Main;
 import org.apache.beehive.wsm.jsr181.model.FooTestCase;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 
 /**
  * Test case verifies that a source file can be read and its annotations can be
  * interpreted by the annotation processor.
  */
-public class WsmAnnotationProcessorTest extends FooTestCase {
+public class WsmAnnotationProcessorTest
+    extends FooTestCase {
 
     @Override
     public void setUp() throws Exception {
@@ -38,11 +36,6 @@
         if (null == objectModel) {
             throw new Exception ("No object model found.");
         }
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        // empty
     }
 
     /**

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/WSDL2AnnotatedJavaTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/WSDL2AnnotatedJavaTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/WSDL2AnnotatedJavaTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/WSDL2AnnotatedJavaTest.java Thu Jun  9 07:56:04 2005
@@ -19,19 +19,18 @@
  * 
  * Original author: Daryoush Mehrtash
  */
-
 package org.apache.beehive.wsm.jsr181.wsdl;
 
-import junit.framework.TestCase;
-
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
 
 /**
  * Test the generation of java class with webservice annotations from a WSDL.
@@ -42,11 +41,6 @@
 
     private static final String generatedFromWSDL = "web.Service";
 
-    public void setUp() throws Exception { }
-
-    public void tearDown() { }
-
-    
     public void testWebServiceAnnotationGeneration() throws Exception {
 
         Class fromWsdl = Class.forName(generatedFromWSDL);

Modified: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java?rev=189760&r1=189759&r2=189760&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java (original)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/wsdl/XmlBeanWSDLProcessorTest.java Thu Jun  9 07:56:04 2005
@@ -23,19 +23,12 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.InputStream;
 import java.util.Collection;
 import java.util.List;
 import java.util.Iterator;
-import javax.jws.WebParam;
-import javax.jws.soap.SOAPBinding;
-import javax.wsdl.OperationType;
 
 import junit.framework.TestCase;
-import org.apache.axis.constants.Style;
-import org.apache.axis.constants.Use;
-import org.apache.axis.description.OperationDesc;
-import org.apache.axis.description.ParameterDesc;
-import org.apache.axis.description.ServiceDesc;
 import org.apache.beehive.wsm.axis.databinding.SystemTypeLookupService;
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
@@ -43,32 +36,34 @@
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 
-/*******************************************************************************
- * 
- *
+/**
  * @author Jonathan Colwell
  */
-public class XmlBeanWSDLProcessorTest extends TestCase {
+public class XmlBeanWSDLProcessorTest
+    extends TestCase {
 
     private static final String BEEHIVE_HOME = System.getProperty("beehive.home");
     private static final String CLASSNAME = "org.apache.beehive.wsm.jsr181.wsdl.StarWars";
 
-    BeehiveWsTypeMetadata serverModel;
-    BeehiveWsTypeMetadata clientModel;
+    private BeehiveWsTypeMetadata serverModel;
+    private BeehiveWsTypeMetadata clientModel;
 
     public void setUp() throws Exception {
-        File f = new File(BEEHIVE_HOME,
-                          "wsm/drt/tests/schemas/starwars.wsdl");
+        File f = new File(BEEHIVE_HOME, "wsm/drt/tests/schemas/starwars.wsdl");
         
         Class clazz = Class.forName(CLASSNAME);
         serverModel = Jsr181ObjectModelStore.load(clazz);
-        
-        XmlBeanWSDLProcessor xbwp = new XmlBeanWSDLProcessor(new FileInputStream(f));
-		
-        clientModel = xbwp.getObjectModel(new SystemTypeLookupService());
-        }
 
-    public void tearDown() {
+        InputStream is = null;
+        try {
+            is = new FileInputStream(f);
+            XmlBeanWSDLProcessor xbwp = new XmlBeanWSDLProcessor(is);
+            clientModel = xbwp.getObjectModel(new SystemTypeLookupService());
+        }
+        finally {
+            if(is != null)
+                is.close();
+        }
     }
 
     public void testServiceWideSettings() throws Exception {
@@ -90,10 +85,8 @@
 
     public void testMethodLevelSettings() throws Exception {
         
-        Collection<? extends BeehiveWsMethodMetadata> serverMethods = serverModel
-            .getMethods();
-        Collection<? extends BeehiveWsMethodMetadata> clientMethods = clientModel
-            .getMethods();
+        Collection<? extends BeehiveWsMethodMetadata> serverMethods = serverModel.getMethods();
+        Collection<? extends BeehiveWsMethodMetadata> clientMethods = clientModel.getMethods();
         assertEquals(serverMethods.size(), clientMethods.size());
         for (BeehiveWsMethodMetadata wmm : serverMethods) {