This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


The following commit(s) were added to refs/heads/master by this push:
     new ee96b0fe1e AXIS2-6051, minor code cleanup after commit to httpclient5
ee96b0fe1e is described below

commit ee96b0fe1e1cee069d4daf375bf66520a87500b1
Author: Robert Lazarski <rlazar...@alphatheory.com>
AuthorDate: Wed May 29 06:53:15 2024 -1000

    AXIS2-6051, minor code cleanup after commit to httpclient5
---
 .../axis2/jaxws/server/JAXWSMessageReceiver.java   |  3 ---
 .../test/org/apache/axis2/json/gson/UtilTest.java  |  8 +++----
 .../test/org/apache/axis2/json/moshi/UtilTest.java |  8 +++----
 .../org/apache/axis2/kernel/TransportUtils.java    |  2 --
 .../axis2/kernel/http/SOAPMessageFormatter.java    |  3 ---
 .../axis2/jaxws/interop/InteropSampleTest.java     |  5 -----
 .../org/apache/axis2/maven2/aar/DeployAarMojo.java |  8 +++----
 .../http/AbstractHTTPTransportSender.java          |  5 ++---
 .../apache/axis2/transport/http/HTTPSender.java    |  8 +++----
 .../httpclient5/HTTPClient5TransportSender.java    |  2 +-
 .../impl/httpclient5/HTTPProxyConfigurator.java    |  1 -
 .../http/impl/httpclient5/HTTPSenderImpl.java      | 22 +++++++++----------
 .../http/server/AxisHttpConnectionImpl.java        | 25 ++++++++++++----------
 .../transport/http/server/AxisHttpRequestImpl.java |  8 +++----
 .../axis2/transport/http/HTTPSenderTest.java       |  1 -
 .../transport/testkit/http/JavaNetClient.java      |  1 -
 .../testkit/tests/async/AsyncMessageTestCase.java  |  6 ------
 17 files changed, 47 insertions(+), 69 deletions(-)

diff --git 
a/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java 
b/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
index e4facf2fd8..6bc742f482 100644
--- a/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
+++ b/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
@@ -234,9 +234,6 @@ public class JAXWSMessageReceiver implements 
MessageReceiver {
             ThreadContextMigratorUtil.performThreadCleanup(
                     Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID, 
axisRequestMsgCtx);
 
-           // FIXME, comment out asap
-            e.printStackTrace();
-
             // TODO.  This is throwing a client exception ?
             // TODO Why are we preserving the stack information  ?  
             
diff --git a/modules/json/test/org/apache/axis2/json/gson/UtilTest.java 
b/modules/json/test/org/apache/axis2/json/gson/UtilTest.java
index 06c9558f00..474cafdf1a 100644
--- a/modules/json/test/org/apache/axis2/json/gson/UtilTest.java
+++ b/modules/json/test/org/apache/axis2/json/gson/UtilTest.java
@@ -20,14 +20,14 @@
 package org.apache.axis2.json.gson;
 
 import org.apache.hc.client5.http.ClientProtocolException;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.classic.methods.HttpPost;
-import org.apache.hc.core5.http.ContentType;
-import org.apache.hc.core5.http.io.entity.StringEntity;
-import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 
 import java.io.IOException;
 
diff --git a/modules/json/test/org/apache/axis2/json/moshi/UtilTest.java 
b/modules/json/test/org/apache/axis2/json/moshi/UtilTest.java
index d918b98343..ff5d2a90e4 100644
--- a/modules/json/test/org/apache/axis2/json/moshi/UtilTest.java
+++ b/modules/json/test/org/apache/axis2/json/moshi/UtilTest.java
@@ -20,14 +20,14 @@
 package org.apache.axis2.json.moshi;
 
 import org.apache.hc.client5.http.ClientProtocolException;
-import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.classic.methods.HttpPost;
-import org.apache.hc.core5.http.ContentType;
-import org.apache.hc.core5.http.io.entity.StringEntity;
-import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpEntity;
 import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 
 import java.io.IOException;
 
diff --git a/modules/kernel/src/org/apache/axis2/kernel/TransportUtils.java 
b/modules/kernel/src/org/apache/axis2/kernel/TransportUtils.java
index 2eec7548f0..42452e0667 100644
--- a/modules/kernel/src/org/apache/axis2/kernel/TransportUtils.java
+++ b/modules/kernel/src/org/apache/axis2/kernel/TransportUtils.java
@@ -82,7 +82,6 @@ public class TransportUtils {
 //            if (envelope.isComplete())
 //                return envelope;
 //        }
-        System.out.println("Starting TransportUtils.createSOAPMessage() ...");
         try {
             InputStream inStream = (InputStream) msgContext
                     .getProperty(MessageContext.TRANSPORT_IN);
@@ -94,7 +93,6 @@ public class TransportUtils {
                 throw new AxisFault(Messages.getMessage("inputstreamNull"));
             }
 
-            System.out.println("Starting TransportUtils.createSOAPMessage() 
InputStream.available() :" + inStream.available());
             String contentType = (String) msgContext
                     .getProperty(Constants.Configuration.CONTENT_TYPE);
 
diff --git 
a/modules/kernel/src/org/apache/axis2/kernel/http/SOAPMessageFormatter.java 
b/modules/kernel/src/org/apache/axis2/kernel/http/SOAPMessageFormatter.java
index a96ffdec79..2a5371aec5 100644
--- a/modules/kernel/src/org/apache/axis2/kernel/http/SOAPMessageFormatter.java
+++ b/modules/kernel/src/org/apache/axis2/kernel/http/SOAPMessageFormatter.java
@@ -95,9 +95,6 @@ public class SOAPMessageFormatter implements MessageFormatter 
{
                 message.serialize(out, format, preserve);
             }
         } catch (IOException e) {
-           // FIXME    
-            System.out.println("SOAPMessageFormatter error: " + 
e.getMessage());
-            e.printStackTrace();
             throw AxisFault.makeFault(e);
         } finally {
             if (log.isDebugEnabled()) {
diff --git 
a/modules/samples/jaxws-interop/src/test/java/org/apache/axis2/jaxws/interop/InteropSampleTest.java
 
b/modules/samples/jaxws-interop/src/test/java/org/apache/axis2/jaxws/interop/InteropSampleTest.java
index 0f998fb3bf..5379d94984 100644
--- 
a/modules/samples/jaxws-interop/src/test/java/org/apache/axis2/jaxws/interop/InteropSampleTest.java
+++ 
b/modules/samples/jaxws-interop/src/test/java/org/apache/axis2/jaxws/interop/InteropSampleTest.java
@@ -39,15 +39,10 @@ public class InteropSampleTest {
         MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class, 
new ClientConfigurationFactory(null, "target/repo/axis2.xml"));
         BaseDataTypesDocLitBService service = new 
BaseDataTypesDocLitBService();
         IBaseDataTypesDocLitB proxy = 
service.getBasicHttpBindingIBaseDataTypesDocLitB();
-       System.out.println("InteropSampleTest has proxy reference ...");
         
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
 server.getEndpoint("BaseDataTypesDocLitBService"));
-       System.out.println("InteropSampleTest retBool ...");
         assertThat(proxy.retBool(true)).isTrue();
-       System.out.println("InteropSampleTest retBool completed ...");
         assertThat(proxy.retInt(42)).isEqualTo(42);
-       System.out.println("InteropSampleTest retInt completed ...");
         String testString = "This is a test";
         assertThat(proxy.retString(testString)).isEqualTo(testString);
-       System.out.println("InteropSampleTest bye ...");
     }
 }
diff --git 
a/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/DeployAarMojo.java
 
b/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/DeployAarMojo.java
index 8b649616a6..203a4534c4 100644
--- 
a/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/DeployAarMojo.java
+++ 
b/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/DeployAarMojo.java
@@ -19,20 +19,20 @@
 
 package org.apache.axis2.maven2.aar;
 
-import org.apache.hc.core5.http.HttpEntity;
-import org.apache.hc.core5.http.NameValuePair;
-import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
 import org.apache.hc.client5.http.classic.methods.HttpGet;
 import org.apache.hc.client5.http.classic.methods.HttpPost;
+import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
 import org.apache.hc.client5.http.entity.mime.FileBody;
 import org.apache.hc.client5.http.entity.mime.HttpMultipartMode;
 import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
 import org.apache.hc.client5.http.impl.classic.HttpClients;
-import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.http.message.BasicNameValuePair;
 import org.apache.hc.core5.http.message.StatusLine;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
 
 
 import org.apache.maven.plugin.MojoExecutionException;
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPTransportSender.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPTransportSender.java
index 750a8d8021..75fd48edca 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPTransportSender.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPTransportSender.java
@@ -300,9 +300,8 @@ public abstract class AbstractHTTPTransportSender extends 
AbstractHandler implem
                     while (iter.hasNext()) {
                         NamedValue nv = (NamedValue) iter.next();
                         if (nv != null) {
-                           Object object = nv.getValue();
                             ((AxisHttpResponse) transportInfo)
-                                    .addHeader(nv.getName(), object);  
+                                    .addHeader(nv.getName(), nv.getValue());   
                         }
                     }
                 } else if (customHeaders instanceof Map) {
@@ -319,7 +318,7 @@ public abstract class AbstractHTTPTransportSender extends 
AbstractHandler implem
                }       
             }
         } else {
-           log.error("AbstractHTTPTransportSender.sendUsingOutputStream() 
found unkwown type, no action taken  ... type: " + transportInfo);    
+           log.error("AbstractHTTPTransportSender.sendUsingOutputStream() 
found unknown type, no action taken  ... type: " + transportInfo);    
        }       
 
         MessageFormatter messageFormatter = 
MessageProcessorSelector.getMessageFormatter(msgContext);
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java 
b/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
index dc95bf4af8..a60e18a2cf 100644
--- a/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
+++ b/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
@@ -42,6 +42,7 @@ import org.apache.commons.logging.LogFactory;
 
 import org.apache.hc.core5.http.HttpStatus;
 import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.util.Timeout;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -270,7 +271,6 @@ public abstract class HTTPSender {
 
     private void addCustomHeaders(MessageContext msgContext, Request request) {
     
-       int xx = 0;    
         boolean isCustomUserAgentSet = false;
         // set the custom headers, if available
         Object httpHeadersObj = 
msgContext.getProperty(HTTPConstants.HTTP_HEADERS);
@@ -284,7 +284,6 @@ public abstract class HTTPSender {
                             isCustomUserAgentSet = true;
                         }
                         request.addHeader(nv.getName(), nv.getValue());
-                       xx++;
                     }
                 }
     
@@ -299,7 +298,6 @@ public abstract class HTTPSender {
                         isCustomUserAgentSet = true;
                     }
                     request.addHeader(key, value);
-                    xx++;
                 }
             }
         } else {
@@ -423,11 +421,11 @@ public abstract class HTTPSender {
 
         if (tempSoTimeoutProperty != null) {
             // SO_TIMEOUT -- timeout for blocking reads
-            // request.setSocketTimeout(tempSoTimeoutProperty);
+            request.setResponseTimeout(tempSoTimeoutProperty);
         } else {
             // set timeout in client
             if (timeout > 0) {
-                // request.setSocketTimeout((int) timeout);
+                request.setResponseTimeout((int) timeout);
             }
         }
     }
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPClient5TransportSender.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPClient5TransportSender.java
index 51850a0250..1d6fc46607 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPClient5TransportSender.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPClient5TransportSender.java
@@ -34,7 +34,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 /**
- * The Class HTTPClient5TransportSender use HC HTTPClient 5.X. 
+ * The Class HTTPClient5TransportSender uses HTTPClient 5.X. 
  */
 public class HTTPClient5TransportSender extends AbstractHTTPTransportSender {
 
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPProxyConfigurator.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPProxyConfigurator.java
index 7b1f4118f7..e8ff9782fe 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPProxyConfigurator.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPProxyConfigurator.java
@@ -152,7 +152,6 @@ public class HTTPProxyConfigurator {
                 clientContext.setCredentialsProvider(credsProvider);
                 credsProvider.setCredentials(new AuthScope(null, -1), 
proxyCredentials);
             }
-            // TODO : Set preemptive authentication, but its not recommended 
in HC 4
             requestConfig.setAuthenticationEnabled(true);
             requestConfig.setProxy(proxy);
        }
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPSenderImpl.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPSenderImpl.java
index f64255079f..ce995f5d9e 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPSenderImpl.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient5/HTTPSenderImpl.java
@@ -29,17 +29,17 @@ import org.apache.axis2.transport.http.Request;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hc.client5.http.classic.HttpClient;
-import org.apache.hc.core5.http.config.CharCodingConfig;
 import org.apache.hc.client5.http.config.ConnectionConfig;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
 import 
org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
+import org.apache.hc.client5.http.impl.io.ManagedHttpClientConnectionFactory;
 import org.apache.hc.client5.http.io.HttpClientConnectionManager;
+import org.apache.hc.client5.http.io.ManagedHttpClientConnection;
 import org.apache.hc.client5.http.socket.ConnectionSocketFactory;
 import org.apache.hc.client5.http.socket.PlainConnectionSocketFactory;
 import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
-import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
-import org.apache.hc.client5.http.impl.io.ManagedHttpClientConnectionFactory;
-import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
-import org.apache.hc.client5.http.io.ManagedHttpClientConnection;
+import org.apache.hc.core5.http.config.CharCodingConfig;
 import org.apache.hc.core5.http.config.Http1Config;
 import org.apache.hc.core5.http.config.Registry;
 import org.apache.hc.core5.http.config.RegistryBuilder;
@@ -150,12 +150,12 @@ public class HTTPSenderImpl extends HTTPSender {
                        SocketConfig socketConfig = SocketConfig.custom()
                             // set timeouts, ignore other defaults
                             .setSoTimeout(socketTO)
-                            .setSoKeepAlive(true)
-                            .setSoReuseAddress(true)
-                            .setTcpNoDelay(true)
-                            .setSoLinger(50, TimeUnit.MILLISECONDS)
-                            .setSndBufSize(8 * 1024)
-                            .setRcvBufSize(8 * 1024)
+                            // .setSoKeepAlive(true)
+                            // .setSoReuseAddress(true)
+                            // .setTcpNoDelay(true)
+                            // .setSoLinger(50, TimeUnit.MILLISECONDS)
+                            // .setSndBufSize(8 * 1024)
+                            // .setRcvBufSize(8 * 1024)
                             .build();
 
                         ConnectionConfig connectionConfig = 
ConnectionConfig.custom().setConnectTimeout(connectTO).build();
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
index ac1f88afdf..b574f7da10 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
@@ -139,7 +139,7 @@ public class AxisHttpConnectionImpl implements 
AxisHttpConnection {
         HttpMessageWriterFactory<ClassicHttpResponse> responseWriterFactory = 
new DefaultHttpResponseWriterFactory(this.http1Config);
         this.requestParser = requestParserFactory.create(this.http1Config);
         this.responseWriter = responseWriterFactory.create();
-       socketHolderRef = new AtomicReference<>(new SocketHolder(socket));
+       this.socketHolderRef = new AtomicReference<>(new SocketHolder(socket));
     }
 
     @Override
@@ -220,18 +220,18 @@ public class AxisHttpConnectionImpl implements 
AxisHttpConnection {
     }
 
     // see org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection 
methods
-    // receiveRequest() and receiveRequestEntity()
+    // receiveRequestHeader() and receiveRequestEntity()
     @Override
     public ClassicHttpRequest receiveRequest() throws HttpException, 
IOException {
         String uuid = UUID.randomUUID().toString();
         // Prepare input stream
         final SocketHolder socketHolder = ensureOpen();
         this.in = socketHolder.getInputStream();
-       CharArrayBuffer headLine = new CharArrayBuffer(128);
+        CharArrayBuffer headLine = new CharArrayBuffer(128);
         this.inbuffer.clear();
         final int i = this.inbuffer.readLine(headLine, this.in);
         if (i == -1) {
-            throw new IOException("readLine() SessionInputBufferImpl returned 
-1 in method receiveRequest() with uuid: " +uuid+ "  ... at time: " 
+LocalDateTime.now());
+            throw new IOException("readLine() from SessionInputBufferImpl 
returned -1 in method receiveRequest() with uuid: " +uuid+ "  ... at time: " 
+LocalDateTime.now());
         }
 
        final Header[] headers = AbstractMessageParser.parseHeaders(
@@ -254,6 +254,14 @@ public class AxisHttpConnectionImpl implements 
AxisHttpConnection {
                 HEADERLOG.debug(">> " + header);
             }
         }
+       ProtocolVersion transportVersion = request.getVersion();
+        if (transportVersion != null && 
transportVersion.greaterEquals(HttpVersion.HTTP_2)) {
+            HEADERLOG.warn("receiveRequestHeader() received http2 version: " + 
transportVersion + " , however axis2 is configured for HTTP/1.1 and the 
connection will be downgraded to HTTP/1.1");
+                // Downgrade protocol version if greater than HTTP/1.1 
+            transportVersion = HttpVersion.HTTP_1_1;
+        }
+        this.version = transportVersion;
+       request.setScheme(this.scheme);
         return request;
     }
     
@@ -270,7 +278,7 @@ public class AxisHttpConnectionImpl implements 
AxisHttpConnection {
         final HttpEntity entity = response.getEntity();
         if (entity == null) {
             if (this.out != null) {
-                HEADERLOG.debug("AxisHttpConnectionImpl.sendResponseEntity() 
found null entity, will flush() and return  ... ");
+                HEADERLOG.debug("AxisHttpConnectionImpl.sendResponse() found 
null entity, will flush() and return  ... ");
                 this.outbuffer.flush(this.out);
            }
             return;
@@ -328,12 +336,7 @@ public class AxisHttpConnectionImpl implements 
AxisHttpConnection {
     }
     
     public InputStream getInputStream() {
-        try {
-            return this.in;
-        } catch (Exception ex) {
-            HEADERLOG.error("getInputStream() error: " + ex.getMessage(), ex);
-           return null;
-        }
+        return this.in;
     }
 
     public OutputStream getOutputStream() {
diff --git 
a/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpRequestImpl.java
 
b/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpRequestImpl.java
index 872c9e34fa..6b35151e9b 100644
--- 
a/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpRequestImpl.java
+++ 
b/modules/transport/http/src/org/apache/axis2/transport/http/server/AxisHttpRequestImpl.java
@@ -49,16 +49,16 @@ public class AxisHttpRequestImpl implements AxisHttpRequest 
{
             final HttpContext context) {
         super();
         if (conn == null) {
-            throw new IllegalArgumentException("HttpHeaders connection may not 
be null");
+            throw new IllegalArgumentException("Http connection may not be 
null");
         }
         if (request == null) {
-            throw new IllegalArgumentException("HttpHeaders request may not be 
null");
+            throw new IllegalArgumentException("Http request may not be null");
         }
         if (httpproc == null) {
-            throw new IllegalArgumentException("HttpHeaders processor may not 
be null");
+            throw new IllegalArgumentException("Http processor may not be 
null");
         }
         if (context == null) {
-            throw new IllegalArgumentException("HttpHeaders context may not be 
null");
+            throw new IllegalArgumentException("Http context may not be null");
         }
         this.request = request;
         this.conn = conn;
diff --git 
a/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java
 
b/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java
index 8956d0846b..5cb216a799 100644
--- 
a/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java
+++ 
b/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java
@@ -84,7 +84,6 @@ public abstract class HTTPSenderTest extends 
AbstractHTTPServerTest {
      */
     public void testSendViaGet() throws Exception {
         int port = getBasicHttpServer().getPort();
-       System.out.println("testSendViaGet() prpoceeding on http://localhost:"; 
+ port + "/getService" );
         sendViaHTTP(Constants.Configuration.HTTP_METHOD_GET, "urn:getService", 
"http://localhost:";
                 + port + "/getService", true);
         assertEquals("Not the expected HTTP Method", 
Constants.Configuration.HTTP_METHOD_GET,
diff --git 
a/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetClient.java
 
b/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetClient.java
index 057a64badd..1fef38ae2b 100644
--- 
a/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetClient.java
+++ 
b/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetClient.java
@@ -55,7 +55,6 @@ public class JavaNetClient implements AsyncTestClient<byte[]> 
{
     public void sendMessage(ClientOptions options, ContentType contentType, 
byte[] message) throws Exception {
         URL url = new URL(channel.getEndpointReference().getAddress());
         log.debug("Opening connection to " + url + " using " + 
URLConnection.class.getName());
-        System.out.println("Opening connection to " + url + " using " + 
URLConnection.class.getName());
         try {
             URLConnection connection = url.openConnection();
             connection.setDoOutput(true);
diff --git 
a/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
 
b/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
index 24eb735332..a3446c331f 100644
--- 
a/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
+++ 
b/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
@@ -47,28 +47,22 @@ public abstract class AsyncMessageTestCase<M> extends 
MessageTestCase {
     protected void doRunTest() throws Throwable {
         endpoint.clear();
         log.debug("Preparing message");
-        System.out.println("Preparing message");
         M expected = prepareMessage();
         
         // Run the test.
 //                    contentTypeMode == ContentTypeMode.TRANSPORT ? 
contentType : null);
         log.debug("Sending message");
-        System.out.println("Sending message");
         client.sendMessage(options, contentType, expected);
         log.debug("Message sent; waiting for endpoint to receive message");
-        System.out.println("Message sent; waiting for endpoint to receive 
message");
         IncomingMessage<M> actual = endpoint.waitForMessage(8000);
         if (actual == null) {
             log.debug("Message NOT received by endpoint; failing test");
-            System.out.println("Message NOT received by endpoint; failing 
test");
             fail("Failed to get message");
         }
         
         log.debug("Message received by endpoint; checking message data");
-        System.out.println("Message received by endpoint; checking message 
data");
         checkMessageData(expected, actual.getData());
         log.debug("Message received by endpoint has expected content");
-        System.out.println("Message received by endpoint has expected 
content");
     }
     
     protected abstract M prepareMessage() throws Exception;

Reply via email to