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/11 00:57:47 UTC

svn commit: r190032 - in /incubator/beehive/trunk/system-controls/test/src/webservice: jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/ jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/ tests/org/apache/beehive/controls/system/webservice/units/dlwservice/ tests/org/apache/beehive/controls/system/webservice/units/utils/ tests/org/apache/beehive/controls/system/webservice/units/webservice/ tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/ webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/

Author: ekoneil
Date: Fri Jun 10 15:57:46 2005
New Revision: 190032

URL: http://svn.apache.org/viewcvs?rev=190032&view=rev
Log:
Service control test cleanup

- fixup source license headers
- some code cleanup

BB: self
DRT: service control pass


Modified:
    incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/HolderUtilsTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitBareWsdlTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitWrapWsdlTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromRpcLitWsdlTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/utils/ControlTestCase.java
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/SimpleWebServiceTest.java
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/LocalAxisServiceFacotry.java
    incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClientAddress.java
    incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClinetStateType.java

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/HolderUtilsTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/HolderUtilsTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/HolderUtilsTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/holders/HolderUtilsTest.java Fri Jun 10 15:57:46 2005
@@ -1,6 +1,6 @@
 /*
  * 
- * Copyright 2004 BEA Systems, Inc.
+ * Copyright 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.
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * 
- * Original author: Daryoush Mehrtash
  */
 package org.apache.beehive.controls.system.webservice.units.holders;
 

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitBareWsdlTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitBareWsdlTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitBareWsdlTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitBareWsdlTest.java Fri Jun 10 15:57:46 2005
@@ -1,6 +1,6 @@
 /*
  * 
- * Copyright 2004 BEA Systems, Inc.
+ * Copyright 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.
@@ -13,9 +13,7 @@
  * 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.
- * 
- * 
- * Original author: Daryoush Mehrtash
+ *
  */
 package org.apache.beehive.controls.system.webservice.units.jcxgen;
 

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitWrapWsdlTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitWrapWsdlTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitWrapWsdlTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromDocLitWrapWsdlTest.java Fri Jun 10 15:57:46 2005
@@ -1,6 +1,6 @@
 /*
  * 
- * Copyright 2004 BEA Systems, Inc.
+ * Copyright 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.
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * 
- * Original author: Daryoush Mehrtash
  */
 package org.apache.beehive.controls.system.webservice.units.jcxgen;
 
@@ -29,8 +27,8 @@
 import java.lang.reflect.Method;
 
 public class JcxGenFromDocLitWrapWsdlTest extends TestCase {
-    private final Class genJcx = jcxgentest.DocumentLiteralWrappedSampleService.class;
 
+    private final Class genJcx = jcxgentest.DocumentLiteralWrappedSampleService.class;
 
     public void testLocationAnnotation() throws Exception {
         ServiceControl.Location loc =

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromRpcLitWsdlTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromRpcLitWsdlTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromRpcLitWsdlTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/JcxGenFromRpcLitWsdlTest.java Fri Jun 10 15:57:46 2005
@@ -1,7 +1,6 @@
 /*
- * 
- * Copyright 2004 BEA Systems, Inc.
- * 
+ * Copyright 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
@@ -14,8 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * 
- * Original author: Daryoush Mehrtash
  */
 package org.apache.beehive.controls.system.webservice.units.jcxgen;
 
@@ -29,8 +26,8 @@
 import java.lang.reflect.Method;
 
 public class JcxGenFromRpcLitWsdlTest extends TestCase {
-    private final Class genJcx = jcxgentest.RpcLiteralSampleService.class;
 
+    private final Class genJcx = jcxgentest.RpcLiteralSampleService.class;
 
     public void testLocationAnnotation() throws Exception {
         ServiceControl.Location loc =

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java Fri Jun 10 15:57:46 2005
@@ -1,7 +1,7 @@
 /*
  * 
- * Copyright 2004 BEA Systems, Inc.
- * 
+ * Copyright 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
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * 
- * Original author: Daryoush Mehrtash
  */
 package org.apache.beehive.controls.system.webservice.units.dlwservice;
 
@@ -27,8 +25,10 @@
 import test.DocumentLiteralWrappedSampleService;
 
 
-public class DocLitWrapWebServiceTest extends ControlTestCase {
-    static Logger logger = Logger.getLogger(DocLitWrapWebServiceTest.class);
+public class DocLitWrapWebServiceTest
+    extends ControlTestCase {
+
+    private static Logger logger = Logger.getLogger(DocLitWrapWebServiceTest.class);
 
     @Control
     public DocumentLiteralWrappedSampleService client;
@@ -52,7 +52,8 @@
         }
     }
 
-    public DocLitWrapWebServiceTest() throws Exception {
+    public DocLitWrapWebServiceTest()
+        throws Exception {
     }
 
     public static Test suite() {

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/utils/ControlTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/utils/ControlTestCase.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/utils/ControlTestCase.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/utils/ControlTestCase.java Fri Jun 10 15:57:46 2005
@@ -31,14 +31,14 @@
 import org.apache.beehive.controls.api.context.ControlContainerContext;
 import org.apache.beehive.controls.api.context.ControlThreadContext;
 
-
 public abstract class ControlTestCase extends TestCase {
 
 	
 	protected void setMyControlObject(Object obj) {
 		beanContext.setBaseObjectToLoadFrom(obj);
 	}
-	public void setUp() throws Exception {
+
+    public void setUp() throws Exception {
 
 		try {
 			beanContext.beginContext();
@@ -50,8 +50,9 @@
 	public void tearDown() {
 		beanContext.endContext();
 	}
-	
-	protected void initializeControls(Object obj) throws Exception {
+
+    /* todo: this doesn't set private control fields! */
+    protected void initializeControls(Object obj) throws Exception {
 		Class cls = obj.getClass();
 		// search for fields with @Control annotations
 		for (Field field : cls.getFields()) {
@@ -62,40 +63,32 @@
 				if (null == ccc) {
 					throw new Exception("no control container context found");
 				}
-				Class clientInitializer = cls.getClassLoader().loadClass(
-						cls.getName() + "ClientInitializer");
-				Method init = clientInitializer.getMethod("initialize",
-						ControlBeanContext.class, cls);
+				Class clientInitializer = cls.getClassLoader().loadClass(cls.getName() + "ClientInitializer");
+				Method init = clientInitializer.getMethod("initialize", ControlBeanContext.class, cls);
 				init.invoke(null, ccc, obj);
 				break;
 			}
 		}
 	}
 
-
-
-	
 	protected JunitTestBeanContext beanContext = new JunitTestBeanContext();
-
 }
 
 class JunitTestBeanContext extends
 		org.apache.beehive.controls.runtime.bean.ControlContainerContext {
 
 	private static final long serialVersionUID = 1L;
-	Object obj;  // used to find the resources 
-	
 
+    private Object obj;  // used to find the resources
 
 	public void setBaseObjectToLoadFrom(Object obj) {
 		this.obj=obj;
 	}
-	public InputStream getResourceAsStream(String name, BeanContextChild bcc)
-			throws IllegalArgumentException {
 
+    public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
 			InputStream is = obj.getClass().getResourceAsStream(name);
 			return is;
-
 	}
 
 	public void initialize() {
@@ -111,20 +104,14 @@
 		return null;
 	}
 
-
-	public Object getService(BeanContextServices arg0, Object arg1, Class arg2,
-			Object arg3) {
-		// TODO Auto-generated method stub
+	public Object getService(BeanContextServices arg0, Object arg1, Class arg2, Object arg3) {
 		return null;
 	}
 
-	public void releaseService(BeanContextServices arg0, Object arg1,
-			Object arg2) {
-
+	public void releaseService(BeanContextServices arg0, Object arg1, Object arg2) {
 	}
 
-	public Iterator getCurrentServiceSelectors(BeanContextServices arg0,
-			Class arg1) {
+	public Iterator getCurrentServiceSelectors(BeanContextServices arg0, Class arg1) {
 		return null;
 	}
 }

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/SimpleWebServiceTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/SimpleWebServiceTest.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/SimpleWebServiceTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/SimpleWebServiceTest.java Fri Jun 10 15:57:46 2005
@@ -1,7 +1,7 @@
 /*
  * 
- * Copyright 2004 BEA Systems, Inc.
- * 
+ * Copyright 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
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * 
- * Original author: Daryoush Mehrtash
  */
 package org.apache.beehive.controls.system.webservice.units.webservice;
 

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/LocalAxisServiceFacotry.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/LocalAxisServiceFacotry.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/LocalAxisServiceFacotry.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/webservice/framework/LocalAxisServiceFacotry.java Fri Jun 10 15:57:46 2005
@@ -1,7 +1,6 @@
 /*
- * 
- * Copyright 2004 BEA Systems, Inc.
- * 
+ * Copyright 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
@@ -13,13 +12,10 @@
  * 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.
- * 
- * 
- * Original author: Daryoush Mehrtash
+ *
  */
-package org.controlhaus.webservice.framework;
+package org.apache.beehive.controls.system.webservice.units.webservice.framework;
 
-import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.Properties;
 
@@ -30,23 +26,18 @@
 
 import org.apache.axis.AxisFault;
 import org.apache.axis.MessageContext;
-import org.apache.axis.configuration.BasicServerConfig;
 import org.apache.axis.configuration.SimpleProvider;
 import org.apache.axis.handlers.soap.SOAPService;
-import org.apache.axis.providers.java.RPCProvider;
 import org.apache.axis.server.AxisServer;
 import org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler;
 import org.apache.log4j.Logger;
 
+public class LocalAxisServiceFacotry extends ServiceFactory {
 
-import org.w3c.dom.Element;
-
+	private static Logger logger = Logger.getLogger(LocalAxisServiceFacotry.class);
 
-public class LocalAxisServiceFacotry extends ServiceFactory {
-	static Logger logger = Logger.getLogger(LocalAxisServiceFacotry.class);
+	private static Class theWebService;
 
-	static Class theWebService;   // the jws file
-	
 	public static void registerAsServiceFactory() {
 		System.setProperty(SERVICEFACTORY_PROPERTY, LocalAxisServiceFacotry.class.getCanonicalName());
 	}
@@ -54,8 +45,7 @@
 	public static void setWebServiceProvider(Class provider) {
 		theWebService = provider;
 	}
-	
-	
+
 	/* (non-Javadoc)
 	 * @see javax.xml.rpc.ServiceFactory#createService(java.net.URL, javax.xml.namespace.QName)
 	 */
@@ -80,7 +70,6 @@
 			service = new org.apache.axis.client.Service();	   // axis service 
 			service.setEngine(server);
 		} catch (Exception e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 		return service;
@@ -136,8 +125,6 @@
         }
     }
 
-    
-    
     private class TestWebServiceHandler
         extends AnnotatedWebServiceDeploymentHandler {
         
@@ -153,8 +140,6 @@
             return super.getSOAPService(cls);
         }
     }
-
- 
 }
 
 

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClientAddress.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClientAddress.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClientAddress.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClientAddress.java Fri Jun 10 15:57:46 2005
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -23,9 +22,10 @@
 public class ClientAddress  implements Serializable
 {
     private static final long serialVersionUID = 1L;
+    
     private int streetNum;
-    private java.lang.String streetName;
-    private java.lang.String city;
+    private String streetName;
+    private String city;
     private ClinetStateType state;
     private int zip;
     private ClientPhone phoneNumber;

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClinetStateType.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClinetStateType.java?rev=190032&r1=190031&r2=190032&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClinetStateType.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/webservice-controls/org/apache/beehive/controls/system/webservice/testmodel/client/ClinetStateType.java Fri Jun 10 15:57:46 2005
@@ -22,7 +22,8 @@
 public class ClinetStateType implements Serializable
 {
     private static final long serialVersionUID = 1L;
-    String state;
+
+    private String state;
    
     /**
      *