You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2007/04/12 06:28:37 UTC

svn commit: r527766 [1/4] - in /webservices/axis2/trunk/java/modules/jaxws/test: org/apache/axis2/jaxws/ org/apache/axis2/jaxws/anytype/tests/ org/apache/axis2/jaxws/attachments/ org/apache/axis2/jaxws/client/ org/apache/axis2/jaxws/client/soapaction/s...

Author: gdaniels
Date: Wed Apr 11 21:28:29 2007
New Revision: 527766

URL: http://svn.apache.org/viewvc?view=rev&rev=527766
Log:
Convert System.out.println()s to using a common JAXWS test logger.  This quells most of the rather intense stream of output from these test by default.  If you want to see it, just activate DEBUG logging for the org.apache.axis2.jaxws.TestLogger class.

Added:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/TestLogger.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/anytype/tests/AnyTypeTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ClientConfigTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/PropertyValueTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/CallbackHandler.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/DOMSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBCallbackHandler.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SAXSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SOAPMessageDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StringDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/server/SOAP12Provider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTestImpl1.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTestImpl2.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTestImpl3.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTestImpl4.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTestImpl5.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/injection/ResourceInjectionTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/lifecycle/EndpointLifecycleTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/PolymorphicShapePortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/JAXBProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SoapMessageProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceMessageProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringMessageProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringProviderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/jaxb/JAXBProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/soapmsg/SoapMessageProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/sourcemsg/SourceMessageProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/StringProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/stringmsg/StringMessageProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/AsyncCallback.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/ProxyNonWrappedTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/ProxyTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/SOAP12ProxyTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/doclitnonwrapped/DocLitnonWrappedImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/soap12/server/SOAP12EchoImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/resourceinjection/ResourceInjectionPortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/rpclit/enumtype/PortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/rpclit/enumtype/tests/RPCLitEnumTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AsyncCallback.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DocLitBareMinTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/FaultsServiceTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleByteArrayTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/NonWrapTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/ParallelAsyncTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/StringListTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/WSGenTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/WrapTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbers/AddNumbersPortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersHandlerPortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/faultsservice/FaultsServiceSoapBindingImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/mtom/MtomSampleProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/mtom/MtomSampleService.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/mtom1/SendImageService.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/parallelasync/common/KillerThread.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/parallelasync/server/DocLitWrappedPortImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/security/BasicAuthSecurityTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/security/server/SecurityProvider.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/utility/SimpleServer.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/wsdl/schemareader/SchemaReaderTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/jaxb/DispatchXPayloadJAXB.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/string/DispatchXMessageString.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/string/DispatchXPayloadString.java
    webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceSkeleton.java

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/TestLogger.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/TestLogger.java?view=auto&rev=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/TestLogger.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/TestLogger.java Wed Apr 11 21:28:29 2007
@@ -0,0 +1,24 @@
+package org.apache.axis2.jaxws;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/*
+* Copyright 2007 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.
+*/
+public class TestLogger {
+    // Just a placeholder for this shared logger object
+    public static Log logger = LogFactory.getLog("JAXWS-Tests");
+}

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/anytype/tests/AnyTypeTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/anytype/tests/AnyTypeTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/anytype/tests/AnyTypeTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/anytype/tests/AnyTypeTests.java Wed Apr 11 21:28:29 2007
@@ -21,19 +21,20 @@
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.anytype.sei.AnyTypeMessagePortType;
 import org.apache.axis2.jaxws.anytype.sei.AnyTypeMessageService;
+import org.apache.axis2.jaxws.TestLogger;
 
 public class AnyTypeTests extends TestCase {
 	
 	public void testAnyTypeElementinWrappedWSDL(){
-		System.out.println("------------------------------");
-		System.out.println("Test : "+getName());
+        TestLogger.logger.debug("------------------------------");
+        TestLogger.logger.debug("Test : " + getName());
 		try{
 			AnyTypeMessageService service = new AnyTypeMessageService();
 			AnyTypeMessagePortType portType = service.getAnyTypePort();
 			String req = new String("Request as String");
 			Object response = portType.echoMessage(req);
 			assertTrue(response instanceof String);
-			System.out.println("Response =" + response);
+            TestLogger.logger.debug("Response =" + response);
 			System.out.print("---------------------------------");
 		}catch(Exception e){
 			e.printStackTrace();

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java Wed Apr 11 21:28:29 2007
@@ -31,6 +31,7 @@
 import org.apache.axis2.jaxws.message.factory.MessageFactory;
 import org.apache.axis2.jaxws.provider.DataSourceImpl;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.TestLogger;
 import org.test.mtom.ImageDepot;
 import org.test.mtom.ObjectFactory;
 import org.test.mtom.SendImage;
@@ -58,8 +59,8 @@
      * binary data that should be optimized when serialized.  
      */
     public void testPlainOMSerialization() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         OMElement payload = createPayload();
         
@@ -69,10 +70,10 @@
                
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         payload.serializeAndConsume(baos, format);
-        
-        System.out.println("==================================");
-        System.out.println(baos.toString());
-        System.out.println("==================================");
+
+        TestLogger.logger.debug("==================================");
+        TestLogger.logger.debug(baos.toString());
+        TestLogger.logger.debug("==================================");
     }
     
     /*
@@ -81,8 +82,8 @@
      * optimized when serialized.  
      */
     public void testSoapOMSerialization() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         OMElement payload = createPayload();
         
@@ -98,15 +99,15 @@
                
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         env.serializeAndConsume(baos, format);
-        
-        System.out.println("==================================");
-        System.out.println(baos.toString());
-        System.out.println("==================================");
+
+        TestLogger.logger.debug("==================================");
+        TestLogger.logger.debug(baos.toString());
+        TestLogger.logger.debug("==================================");
     }
     
     public void testMTOMAttachmentWriter() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         //Create a DataHandler with the String DataSource object
         DataHandler dataHandler = new DataHandler(imageDS);
@@ -141,10 +142,10 @@
                
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         soapOM.serializeAndConsume(baos, format);
-        
-        System.out.println("==================================");
-        System.out.println(baos.toString());
-        System.out.println("==================================");
+
+        TestLogger.logger.debug("==================================");
+        TestLogger.logger.debug(baos.toString());
+        TestLogger.logger.debug("==================================");
     }
     
     private OMElement createPayload() {

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ClientConfigTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ClientConfigTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ClientConfigTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ClientConfigTests.java Wed Apr 11 21:28:29 2007
@@ -11,6 +11,7 @@
 import javax.xml.ws.WebServiceException;
 
 import junit.framework.TestCase;
+import org.apache.axis2.jaxws.TestLogger;
 
 public class ClientConfigTests extends TestCase {
 
@@ -47,7 +48,7 @@
         } catch (WebServiceException e) {
             // We should only get a WebServiceException here.  Anything else
             // is a failure.
-            System.out.println("[pass] - the proper fault type was thrown");
+            TestLogger.logger.debug("[pass] - the proper fault type was thrown");
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/DispatchSoapActionTests.java Wed Apr 11 21:28:29 2007
@@ -28,6 +28,7 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.BindingProvider;
+import org.apache.axis2.jaxws.TestLogger;
 import org.apache.axis2.jaxws.client.soapaction.BookStoreService;
 import org.apache.axis2.jaxws.client.soapaction.GetPriceResponseType;
 import org.apache.axis2.jaxws.client.soapaction.GetPriceType;
@@ -47,8 +48,8 @@
      * ourselves for the invoke.
      */
     public void testSendRequestWithSoapAction() throws Exception {
-        System.out.println("----------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("----------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         BookStoreService service = new BookStoreService();
         
@@ -74,7 +75,7 @@
         assertNotNull("The response was null", value);
         
         float price = value.getPrice();
-        System.out.println("return value [" + price + "]");
+        TestLogger.logger.debug("return value [" + price + "]");
         //assertTrue("The return value was invalid", price > 0);
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/PropertyValueTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/PropertyValueTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/PropertyValueTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/PropertyValueTests.java Wed Apr 11 21:28:29 2007
@@ -28,6 +28,7 @@
 import javax.xml.ws.WebServiceException;
 
 import junit.framework.TestCase;
+import org.apache.axis2.jaxws.TestLogger;
 
 /**
  * A suite to test the validation of the client request/response context properties
@@ -51,7 +52,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
 
         try {
@@ -59,7 +60,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
         
         try {
@@ -67,7 +68,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
 
         try {
@@ -75,7 +76,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
         
         try {
@@ -83,7 +84,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
 
         try {
@@ -91,7 +92,7 @@
             fail();
         }
         catch (WebServiceException wse) {
-            System.out.println("[pass] - exception thrown as expected");
+            TestLogger.logger.debug("[pass] - exception thrown as expected");
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/ProxySoapActionTests.java Wed Apr 11 21:28:29 2007
@@ -21,6 +21,7 @@
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.client.soapaction.BookStore;
 import org.apache.axis2.jaxws.client.soapaction.BookStoreService;
+import org.apache.axis2.jaxws.TestLogger;
 
 /**
  * A suite of SOAPAction related tests for the dynamic proxy client 
@@ -32,14 +33,14 @@
     }
     
     public void testSendRequestWithSoapAction() {
-        System.out.println("----------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("----------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 
         BookStoreService service = new BookStoreService();
         BookStore bs = service.getBookStorePort();
         
         float price = bs.getPriceWithAction("test item");
-        System.out.println("return value [" + price + "]");
+        TestLogger.logger.debug("return value [" + price + "]");
         //assertTrue("The return value was invalid", price > 0);
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/soapaction/server/SOAPActionTestsMessageReceiver.java Wed Apr 11 21:28:29 2007
@@ -28,6 +28,7 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.jaxws.TestLogger;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.engine.AxisEngine;
@@ -42,10 +43,10 @@
 public class SOAPActionTestsMessageReceiver implements MessageReceiver {
     
     public void receive(MessageContext request) throws AxisFault {
-        System.out.println("[server] SOAPActionTestsMessageReceiver: new request received");
+        TestLogger.logger.debug("[server] SOAPActionTestsMessageReceiver: new request received");
         
-        SOAPEnvelope env = request.getEnvelope();        
-        System.out.println("[server] request message [" + env + "]");
+        SOAPEnvelope env = request.getEnvelope();
+        TestLogger.logger.debug("[server] request message [" + env + "]");
         
         // Get the first child element
         Iterator itr = env.getBody().getChildElements();
@@ -64,11 +65,11 @@
             float status = 0;
             if (checkOperation("getPrice", request) &&
                 checkSOAPAction("", request)) {
-                System.out.println("[server] all checks passed");
+                TestLogger.logger.debug("[server] all checks passed");
                 status = 1;
             }
             else {
-                System.out.println("[server] some checks failed");
+                TestLogger.logger.debug("[server] some checks failed");
             }
             
             responseBodyContent = sf.createOMElement(new QName("http://jaxws.axis2.apache.org/client/soapaction", "getPriceWithActionResponse"), responseEnv.getBody());
@@ -80,11 +81,11 @@
             float status = 0;
             if (checkOperation("getPriceWithAction", request) &&
                 checkSOAPAction("http://jaxws.axis2.apache.org/client/soapaction/getPrice", request)) {
-                System.out.println("[server] all checks passed");
+                TestLogger.logger.debug("[server] all checks passed");
                 status = 1;
             }
             else {
-                System.out.println("[server] some checks failed");
+                TestLogger.logger.debug("[server] some checks failed");
             }
             
             responseBodyContent = sf.createOMElement(new QName("http://jaxws.axis2.apache.org/client/soapaction", "getPriceWithActionResponse"), responseEnv.getBody());
@@ -112,8 +113,8 @@
         MessageContext response = MessageContextBuilder.createOutMessageContext(request);
         responseEnv.getBody().addChild(responseBodyContent);
         response.setEnvelope(responseEnv);
-        
-        System.out.println("[server] response message [" + responseEnv.toString() + "]");
+
+        TestLogger.logger.debug("[server] response message [" + responseEnv.toString() + "]");
         
         response.getOperationContext().addMessageContext(response);
         AxisEngine engine = new AxisEngine(response.getConfigurationContext());
@@ -126,13 +127,14 @@
      */
     private boolean checkOperation(String expectedOperationName, MessageContext mc) {
         AxisOperation op = mc.getAxisOperation();
-        System.out.println("[server] checking expected operation [" + expectedOperationName + "] against resolved operation [" + op.getName() + "]");
+        TestLogger.logger.debug("[server] checking expected operation [" + expectedOperationName +
+                "] against resolved operation [" + op.getName() + "]");
         if (op.getName().getLocalPart().equals(expectedOperationName)) {
-            System.out.println("[server] operation name is correct");
+            TestLogger.logger.debug("[server] operation name is correct");
             return true;
         }
         else {
-            System.out.println("[server] operation name is incorrect");
+            TestLogger.logger.debug("[server] operation name is incorrect");
             return false;
         }
     }
@@ -143,13 +145,14 @@
      */
     private boolean checkSOAPAction(String expectedAction, MessageContext mc) {
        String action = mc.getSoapAction();
-       System.out.println("[server] checking expected action [" + expectedAction + "] against received action [" + action + "]");
+        TestLogger.logger.debug("[server] checking expected action [" + expectedAction +
+                "] against received action [" + action + "]");
        if (action != null && action.equals(expectedAction)) {
-           System.out.println("[server] soap action is correct");
+           TestLogger.logger.debug("[server] soap action is correct");
            return true;
        }           
        else {
-           System.out.println("[server] soap action is incorrect");
+           TestLogger.logger.debug("[server] soap action is incorrect");
            return false;
        }   
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/description/DescriptionTestUtils2.java Wed Apr 11 21:28:29 2007
@@ -27,6 +27,7 @@
 import javax.xml.ws.Service;
 
 import org.apache.axis2.jaxws.spi.ServiceDelegate;
+import org.apache.axis2.jaxws.TestLogger;
 
 /**
  * 
@@ -51,7 +52,9 @@
         try {
             wsdlURL = new URL(urlString);
         } catch (Exception e) {
-            System.out.println("Caught exception creating WSDL URL :" + urlString + "; exception: " + e.toString());
+            TestLogger.logger.debug(
+                    "Caught exception creating WSDL URL :" + urlString + "; exception: " +
+                            e.toString());
         }
         return wsdlURL;
     }
@@ -64,7 +67,9 @@
             wsdlDefinition = reader.readWSDL(wsdlURL.toString());
         }
         catch (Exception e) {
-            System.out.println("*** ERROR ***: Caught exception trying to create WSDL Definition: " + e);
+            TestLogger.logger
+                    .debug("*** ERROR ***: Caught exception trying to create WSDL Definition: " +
+                            e);
             e.printStackTrace();
         }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/CallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/CallbackHandler.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/CallbackHandler.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/CallbackHandler.java Wed Apr 11 21:28:29 2007
@@ -26,11 +26,12 @@
 import javax.xml.ws.Response;
 
 import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.TestLogger;
 
 public class CallbackHandler<T> implements AsyncHandler <T> {
 
     public void handleResponse(Response response) {
-        System.out.println(">> Processing async reponse");
+        TestLogger.logger.debug(">> Processing async reponse");
         try{
             T res = (T) response.get();
             
@@ -41,7 +42,7 @@
             }
             
             if(res instanceof String){
-                System.out.println("Response [" + res + "]");
+                TestLogger.logger.debug("Response [" + res + "]");
             }
             else if(Source.class.isAssignableFrom(res.getClass())){
                 Source source = (Source) res;
@@ -50,10 +51,10 @@
                 XMLStreamReader reader = inputFactory.createXMLStreamReader(source);
                 Reader2Writer r2w = new Reader2Writer(reader);
                 String responseText = r2w.getAsString();
-                
-                System.out.println(responseText);
+
+                TestLogger.logger.debug(responseText);
             }
-            System.out.println("---------------------------------------------");
+            TestLogger.logger.debug("---------------------------------------------");
         }catch(Exception e){
             e.printStackTrace();
         }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/DOMSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/DOMSourceDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/DOMSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/DOMSourceDispatch.java Wed Apr 11 21:28:29 2007
@@ -34,6 +34,7 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.TestLogger;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
@@ -46,8 +47,8 @@
     private static final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
     
     public void testSyncPayloadMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -57,14 +58,14 @@
         
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleBodyContent);
-        
-		System.out.println(">> Invoking sync Dispatch");
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
 		Source response = dispatch.invoke(request);
 		assertNotNull("dispatch invoke returned null",response);
 		
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -74,8 +75,8 @@
 	}
 
 	public void testSyncMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -85,14 +86,14 @@
         
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleSoapMessage);
-        
-        System.out.println(">> Invoking sync Dispatch");
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
         Source response = dispatch.invoke(request);
         assertNotNull("dispatch invoke returned null",response);
         
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -102,8 +103,8 @@
 	}
 
     public void testAsyncCallbackPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -116,12 +117,12 @@
 
         // Setup the callback for async responses
         AsyncCallback<Source> callbackHandler = new AsyncCallback<Source>();
-        
-        System.out.println(">> Invoking async (callback) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Future<?> monitor = dispatch.invokeAsync(request, callbackHandler);
             
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -129,8 +130,8 @@
         assertNotNull(response);
         
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -140,8 +141,8 @@
     }
     
     public void testAsyncCallbackMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -154,12 +155,12 @@
 
         // Setup the callback for async responses
         AsyncCallback<Source> callbackHandler = new AsyncCallback<Source>();
-        
-        System.out.println(">> Invoking async (callback) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Future<?> monitor = dispatch.invokeAsync(request, callbackHandler);
 	        
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -167,8 +168,8 @@
         assertNotNull(response);
         
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -178,8 +179,8 @@
 	}
     
     public void testAsyncPollingPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -190,11 +191,11 @@
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleBodyContent);
 
-        System.out.println(">> Invoking async (polling) Dispatch");
+        TestLogger.logger.debug(">> Invoking async (polling) Dispatch");
         Response<Source> asyncResponse = dispatch.invokeAsync(request);
             
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -202,8 +203,8 @@
         assertNotNull(response);
         
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -213,8 +214,8 @@
     }
     
     public void testAsyncPollingMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -225,11 +226,11 @@
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleSoapMessage);
 
-        System.out.println(">> Invoking async (callback) Dispatch");
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Response<Source> asyncResponse = dispatch.invokeAsync(request);
             
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -237,8 +238,8 @@
         assertNotNull(response);
         
         // Turn the Source into a String so we can check it
-        String responseText = createStringFromSource(response);        
-        System.out.println(responseText);
+        String responseText = createStringFromSource(response);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -248,8 +249,8 @@
     }
     
     public void testOneWayPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -260,13 +261,13 @@
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleBodyContent);
 
-        System.out.println(">> Invoking One Way Dispatch");
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
         dispatch.invokeOneWay(request);
     }
     
     public void testOneWayMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -277,13 +278,13 @@
         // Create the DOMSource
         DOMSource request = createDOMSourceFromString(DispatchTestConstants.sampleSoapMessage);
 
-        System.out.println(">> Invoking One Way Dispatch");
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
         dispatch.invokeOneWay(request);
 	}
     
     public void testBadDOMSource() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -298,7 +299,7 @@
             dispatch.invokeOneWay(request);
             fail("WebServiceException was expected");
         } catch (WebServiceException e) {
-            System.out.println("A Web Service Exception was expected: " + e.toString());
+            TestLogger.logger.debug("A Web Service Exception was expected: " + e.toString());
             assertTrue(e.getMessage() != null);
         } catch (Exception e) {
             fail("WebServiceException was expected, but received " + e);

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBCallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBCallbackHandler.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBCallbackHandler.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBCallbackHandler.java Wed Apr 11 21:28:29 2007
@@ -22,6 +22,7 @@
 import javax.xml.ws.Response;
 
 import test.EchoStringResponse;
+import org.apache.axis2.jaxws.TestLogger;
 
 public class JAXBCallbackHandler<T> implements AsyncHandler<T> {
 
@@ -29,7 +30,7 @@
     public void handleResponse(Response response) {
         try {
             data = (T) response.get();
-            System.out.println(">> Async response received: " + data);
+            TestLogger.logger.debug(">> Async response received: " + data);
         } catch (Exception e) {
             e.printStackTrace();
         }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBDispatch.java Wed Apr 11 21:28:29 2007
@@ -27,6 +27,7 @@
 
 import org.xmlsoap.schemas.soap.envelope.Body;
 import org.xmlsoap.schemas.soap.envelope.Envelope;
+import org.apache.axis2.jaxws.TestLogger;
 
 import junit.framework.TestCase;
 import test.EchoString;
@@ -59,8 +60,8 @@
     }
     
     public void testSyncPayload() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -68,12 +69,12 @@
         request.setInput("SYNC JAXB PAYLOAD TEST");
         
         // Invoke the Dispatch<Object>
-        System.out.println(">> Invoking sync Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking sync Dispatch with JAX-B Parameter");
         EchoStringResponse response = (EchoStringResponse) dispatchPayload.invoke(request);
         
         assertNotNull(response);
-        
-        System.out.println(">> Response content: " + response.getEchoStringReturn());
+
+        TestLogger.logger.debug(">> Response content: " + response.getEchoStringReturn());
         
         assertTrue("[ERROR] - Response object was null", response != null);
         assertTrue("[ERROR] - No content in response object", response.getEchoStringReturn() != null);
@@ -81,8 +82,8 @@
     }
     
     public void testAysncPayload() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -93,18 +94,18 @@
         JAXBCallbackHandler<Object> callback = new JAXBCallbackHandler<Object>();
         
         // Invoke the Dispatch<Object> asynchronously
-        System.out.println(">> Invoking async(callback) Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking async(callback) Dispatch with JAX-B Parameter");
         Future<?> monitor = dispatchPayload.invokeAsync(request, callback);
         
         while (!monitor.isDone()) {
-             System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
              Thread.sleep(1000);
         }
         
         EchoStringResponse response = (EchoStringResponse) callback.getData();
         assertNotNull(response);
-        
-        System.out.println(">> Response content: " + response.getEchoStringReturn());
+
+        TestLogger.logger.debug(">> Response content: " + response.getEchoStringReturn());
         
         assertTrue("[ERROR] - Response object was null", response != null);
         assertTrue("[ERROR] - No content in response object", response.getEchoStringReturn() != null);
@@ -113,8 +114,8 @@
     }
     
     public void testOneWayPayload() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -122,13 +123,13 @@
         request.setInput("ONE-WAY JAXB PAYLOAD TEST");
         
         // Invoke the Dispatch<Object> one-way
-        System.out.println(">> Invoking one-way Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking one-way Dispatch with JAX-B Parameter");
         dispatchPayload.invokeOneWay(request);
     }
     
     public void testSyncMessage() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -141,7 +142,7 @@
         jbc.createMarshaller().marshal(request,System.out);
         
         // Invoke the Dispatch<Object>
-        System.out.println(">> Invoking sync Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking sync Dispatch with JAX-B Parameter");
         JAXBElement<Envelope> jaxbResponse = (JAXBElement<Envelope>) dispatchMessage.invoke(request);
         
         assertNotNull(jaxbResponse);
@@ -149,15 +150,15 @@
         assertNotNull(response);
         assertNotNull(response.getBody());
         EchoStringResponse echoStringResponse = (EchoStringResponse) response.getBody().getAny().get(0);
-        
-        System.out.println(">> Response content: " + echoStringResponse.getEchoStringReturn());
+
+        TestLogger.logger.debug(">> Response content: " + echoStringResponse.getEchoStringReturn());
         assertTrue("[ERROR] - No content in response object", echoStringResponse.getEchoStringReturn() != null);
         assertTrue("[ERROR] - Zero length content in response", echoStringResponse.getEchoStringReturn().length() > 0);
     }
     
     public void testAysncMessage() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -172,11 +173,11 @@
         JAXBCallbackHandler<Object> callback = new JAXBCallbackHandler<Object>();
         
         // Invoke the Dispatch<Object> asynchronously
-        System.out.println(">> Invoking async(callback) Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking async(callback) Dispatch with JAX-B Parameter");
         Future<?> monitor = dispatchMessage.invokeAsync(request, callback);
         
         while (!monitor.isDone()) {
-             System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
              Thread.sleep(1000);
         }
         
@@ -188,8 +189,8 @@
         assertNotNull(response);
         assertNotNull(response.getBody());
         EchoStringResponse echoStringResponse = (EchoStringResponse) response.getBody().getAny().get(0);
-        
-        System.out.println(">> Response content: " + echoStringResponse.getEchoStringReturn());
+
+        TestLogger.logger.debug(">> Response content: " + echoStringResponse.getEchoStringReturn());
         assertTrue("[ERROR] - No content in response object", echoStringResponse.getEchoStringReturn() != null);
         assertTrue("[ERROR] - Zero length content in response", echoStringResponse.getEchoStringReturn().length() > 0);
 
@@ -197,8 +198,8 @@
     }
     
     public void testOneWayMessge() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 
         // Create the input param
         ObjectFactory factory = new ObjectFactory();
@@ -209,7 +210,7 @@
         request.getValue().getBody().getAny().add(echoString);
         
         // Invoke the Dispatch<Object> one-way
-        System.out.println(">> Invoking one-way Dispatch with JAX-B Parameter");
+        TestLogger.logger.debug(">> Invoking one-way Dispatch with JAX-B Parameter");
         dispatchMessage.invokeOneWay(request);
     }
     

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBSourceDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/JAXBSourceDispatch.java Wed Apr 11 21:28:29 2007
@@ -34,6 +34,7 @@
 import junit.framework.TestCase;
 import org.test.dispatch.jaxbsource.Invoke;
 import org.test.dispatch.jaxbsource.ObjectFactory;
+import org.apache.axis2.jaxws.TestLogger;
 
 /*
 * This is a test case for Invoking Dispatch with a JAXBSource.
@@ -52,8 +53,8 @@
 	private QName portName =new QName("http://ws.apache.org/axis2", "SimpleProviderServiceSOAP11port0");
 	
     public void testJAXBSourceSyncPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         try{
 	        // Initialize the JAX-WS client artifacts
 	        Service svc = Service.create(serviceName);
@@ -68,7 +69,7 @@
 	       
 	        JAXBSource jbSrc = new JAXBSource(ctx.createMarshaller(), invokeObj);
 	        // Invoke the Dispatch
-	        System.out.println(">> Invoking sync Dispatch");
+            TestLogger.logger.debug(">> Invoking sync Dispatch");
 	        //Invoke Server endpoint and read response
 	        Source response = dispatch.invoke(jbSrc);
 	       
@@ -78,9 +79,9 @@
 	        Transformer t = TransformerFactory.newInstance().newTransformer();
 	        Result result = new StreamResult(writer);
 	        t.transform(response, result);
-	
-	        System.out.println("Response On Client: \n"+writer.getBuffer().toString());
-	        System.out.println("---------------------------------------");
+
+            TestLogger.logger.debug("Response On Client: \n" + writer.getBuffer().toString());
+            TestLogger.logger.debug("---------------------------------------");
         }catch(Exception e){
         	e.printStackTrace();
         }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SAXSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SAXSourceDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SAXSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SAXSourceDispatch.java Wed Apr 11 21:28:29 2007
@@ -32,6 +32,7 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.TestLogger;
 import org.xml.sax.InputSource;
 
 /**
@@ -43,8 +44,8 @@
     private static final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
     
 	public void testSyncPayloadMode() throws Exception {
-		System.out.println("---------------------------------------");
-		System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -57,8 +58,8 @@
 		ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
 		Source request = new SAXSource(input);
-		
-        System.out.println(">> Invoking sync Dispatch");
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
 		Source response = dispatch.invoke(request);
         
 		assertNotNull("dispatch invoke returned null", response);
@@ -67,7 +68,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -77,8 +78,8 @@
 	}
 
 	public void testSyncMessageMode() throws Exception {
-		System.out.println("---------------------------------------");
-		System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -91,8 +92,8 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-		
-		System.out.println(">> Invoking sync Dispatch with Message Mode");
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch with Message Mode");
 		Source response = dispatch.invoke(request);
 
         assertNotNull("dispatch invoke returned null", response);
@@ -101,7 +102,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -111,8 +112,8 @@
 	}
 
     public void testAsyncCallbackPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -128,12 +129,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-        System.out.println(">> Invoking async (callback) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Future<?> monitor = dispatch.invokeAsync(request, callbackHandler);
 
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -144,7 +145,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -154,8 +155,8 @@
     }
     
     public void testAsyncCallbackMessageMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -171,12 +172,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-        System.out.println(">> Invoking async (callback) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Future<?> monitor = dispatch.invokeAsync(request, callbackHandler);
 
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -187,7 +188,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -197,8 +198,8 @@
 	}
     
     public void testAsyncPollingPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -211,12 +212,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-        System.out.println(">> Invoking async (polling) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (polling) Dispatch");
         Response<Source> asyncResponse = dispatch.invokeAsync(request);
 
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -227,7 +228,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -237,8 +238,8 @@
     }
     
     public void testAsyncPollingMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -251,12 +252,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-        System.out.println(">> Invoking async (callback) Dispatch");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
         Response<Source> asyncResponse = dispatch.invokeAsync(request);
 
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -267,7 +268,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -277,8 +278,8 @@
     }
     
     public void testOneWayPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -291,14 +292,14 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-        System.out.println(">> Invoking One Way Dispatch");
+
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
         dispatch.invokeOneWay(request);
     }
     
     public void testOneWayMessageMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -311,14 +312,14 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         InputSource input = new InputSource(stream);
         Source request = new SAXSource(input);
-        
-		System.out.println(">> Invoking One Way Dispatch");
+
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
 		dispatch.invokeOneWay(request);
 	}
     
     public void testBadSAXSource() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -333,7 +334,7 @@
             dispatch.invoke(request);
             fail("WebServiceException was expected");
         } catch (WebServiceException e) {
-            System.out.println("A Web Service Exception was expected: " + e.toString());
+            TestLogger.logger.debug("A Web Service Exception was expected: " + e.toString());
             assertTrue(e.getMessage() != null);
         } catch (Exception e) {
             fail("WebServiceException was expected, but received:" + e);
@@ -343,7 +344,7 @@
             dispatch.invokeOneWay(request);
             fail("WebServiceException was expected");
         } catch (WebServiceException e) {
-            System.out.println("A Web Service Exception was expected: " + e.toString());
+            TestLogger.logger.debug("A Web Service Exception was expected: " + e.toString());
             assertTrue(e.getMessage() != null);
         } catch (Exception e) {
             fail("WebServiceException was expected, but received:" + e);

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SOAPMessageDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SOAPMessageDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SOAPMessageDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/SOAPMessageDispatch.java Wed Apr 11 21:28:29 2007
@@ -30,6 +30,7 @@
 import javax.xml.ws.Service;
 
 import junit.framework.TestCase;
+import org.apache.axis2.jaxws.TestLogger;
 
 public class SOAPMessageDispatch extends TestCase {
 	private String url = "http://localhost:8080/axis2/services/ProxyDocLitWrappedService";
@@ -44,9 +45,9 @@
 		
         String basedir = new File(System.getProperty("basedir",".")).getAbsolutePath();
         String messageResource = new File(basedir, this.messageResource).getAbsolutePath();
-        
-		System.out.println("---------------------------------------");
-		System.out.println("test: " + getName());
+
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 		//Initialize the JAX-WS client artifacts
 		Service svc = Service.create(serviceName);
 		svc.addPort(portName, null, url);
@@ -59,7 +60,7 @@
 		SOAPMessage msgObject = factory.createMessage(null, inputStream);
 
 		//Invoke the Dispatch
-		System.out.println(">> Invoking Async Dispatch");
+        TestLogger.logger.debug(">> Invoking Async Dispatch");
 		SOAPMessage response = dispatch.invoke(msgObject);
 
 		assertNotNull("dispatch invoke returned null", response);
@@ -70,9 +71,9 @@
 		
         String basedir = new File(System.getProperty("basedir",".")).getAbsolutePath();
         String messageResource = new File(basedir, this.messageResource).getAbsolutePath();
-        
-		System.out.println("---------------------------------------");
-		System.out.println("test: " + getName());
+
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
 		//Initialize the JAX-WS client artifacts
 		Service svc = Service.create(serviceName);
 		svc.addPort(portName, null, url);
@@ -86,12 +87,12 @@
 		
         AsyncCallback<SOAPMessage> ac = new AsyncCallback<SOAPMessage>();
 		//Invoke the Dispatch
-		System.out.println(">> Invoking sync Dispatch");
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
 		Future<?> monitor = dispatch.invokeAsync(msgObject, ac);
 
 		assertNotNull("dispatch invokeAsync returned null Future<?>", monitor);
 		while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -104,9 +105,9 @@
         
         String basedir = new File(System.getProperty("basedir",".")).getAbsolutePath();
         String messageResource = new File(basedir, this.messageResource).getAbsolutePath();
-        
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         //Initialize the JAX-WS client artifacts
         Service svc = Service.create(serviceName);
         svc.addPort(portName, null, url);
@@ -119,12 +120,12 @@
         SOAPMessage msgObject = factory.createMessage(null, inputStream);
 
         //Invoke the Dispatch
-        System.out.println(">> Invoking sync Dispatch");
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
         Response<SOAPMessage> asyncResponse = dispatch.invokeAsync(msgObject);
 
         assertNotNull("dispatch invokeAsync returned null Response", asyncResponse);
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java?view=diff&rev=527766&r1=527765&r2=527766
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java Wed Apr 11 21:28:29 2007
@@ -33,6 +33,7 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.TestLogger;
 
 /**
  * This class tests the JAX-WS Dispatch<Source> functionality with various
@@ -47,8 +48,8 @@
      * Invoke a Dispatch<Source> synchronously with the content in PAYLOAD mode.
 	 */
     public void testSyncPayloadMode() throws Exception {
-		System.out.println("---------------------------------------");
-		System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -62,7 +63,7 @@
         Source srcStream = new StreamSource((InputStream) stream);
         
         // Invoke the Dispatch<Source>
-		System.out.println(">> Invoking sync Dispatch with PAYLOAD mode");
+        TestLogger.logger.debug(">> Invoking sync Dispatch with PAYLOAD mode");
 		Source response = dispatch.invoke(srcStream);
 		assertNotNull(response);
         
@@ -70,7 +71,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -83,8 +84,8 @@
      * Invoke a Dispatch<Source> synchronously with the content in MESSAGE mode.
      */
     public void testSyncMessageMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
 		Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -96,8 +97,8 @@
         byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         Source srcStream = new StreamSource((InputStream) stream);
-        
-        System.out.println(">> Invoking sync Dispatch with MESSAGE Mode");
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch with MESSAGE Mode");
 		StreamSource response = (StreamSource) dispatch.invoke(srcStream);
         assertNotNull(response);
 
@@ -105,7 +106,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -118,8 +119,8 @@
      * Invoke a Dispatch<Source> asynchronously with the content in PAYLOAD mode.
      */
     public void testAsyncCallbackPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -135,12 +136,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         Source srcStream = new StreamSource((InputStream) stream);
 
-        System.out.println(">> Invoking async (callback) Dispatch with PAYLOAD mode");
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with PAYLOAD mode");
         Future<?> monitor = dispatch.invokeAsync(srcStream, callbackHandler);
 
         // Wait for the async response to be returned
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -151,7 +152,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -164,8 +165,8 @@
      * Invoke a Dispatch<Source> asynchronously with the content in MESSAGE mode.
      */
 	public void testAsyncCallbackMessageMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts 
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -180,13 +181,13 @@
         byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
 		Source srcStream = new StreamSource((InputStream) stream);
-		
-        System.out.println(">> Invoking async (callback) Dispatch with MESSAGE mode");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with MESSAGE mode");
         Future<?> monitor = dispatch.invokeAsync(srcStream, callbackHandler);
 
         // Wait for the async response to be returned
         while (!monitor.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -197,7 +198,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -210,8 +211,8 @@
      * Invoke a Dispatch<Source> asynchronously with the content in PAYLOAD mode.
      */
     public void testAsyncPollingPayloadMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -223,12 +224,12 @@
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         Source srcStream = new StreamSource((InputStream) stream);
 
-        System.out.println(">> Invoking async (callback) Dispatch with PAYLOAD mode");
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with PAYLOAD mode");
         Response<Source> asyncResponse = dispatch.invokeAsync(srcStream);
 
         // Wait for the async response to be returned
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -239,7 +240,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(!responseText.contains("soap"));
@@ -252,8 +253,8 @@
      * Invoke a Dispatch<Source> asynchronously with the content in MESSAGE mode.
      */
     public void testAsyncPollingMessageMode() throws Exception {
-        System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts 
         Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -265,13 +266,13 @@
         byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
         Source srcStream = new StreamSource((InputStream) stream);
-        
-        System.out.println(">> Invoking async (callback) Dispatch with MESSAGE mode");
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with MESSAGE mode");
         Response<Source> asyncResponse = dispatch.invokeAsync(srcStream);
 
         // Wait for the async response to be returned
         while (!asyncResponse.isDone()) {
-            System.out.println(">> Async invocation still not complete");
+            TestLogger.logger.debug(">> Async invocation still not complete");
             Thread.sleep(1000);
         }
         
@@ -282,7 +283,7 @@
         XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
         Reader2Writer r2w = new Reader2Writer(reader);
         String responseText = r2w.getAsString();
-        System.out.println(responseText);
+        TestLogger.logger.debug(responseText);
         
         // Check to make sure the content is correct
         assertTrue(responseText.contains("soap"));
@@ -295,8 +296,8 @@
      * Invoke a Dispatch<Source> one-way operation
      */
 	public void testOneWayPayloadMode() throws Exception {
-		System.out.println("---------------------------------------");
-        System.out.println("test: " + getName());
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
         
         // Initialize the JAX-WS client artifacts
 		Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
@@ -308,8 +309,8 @@
         byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
         ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
 		Source srcStream = new StreamSource((InputStream) stream);
-		
-		System.out.println(">> Invoking One Way Dispatch");
+
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
 		dispatch.invokeOneWay(srcStream);
 	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org