cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [cxf] branch master updated: Update async-http-client to 2.0.x
Date Mon, 07 Jan 2019 14:48:56 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new cb332a2  Update async-http-client to 2.0.x
cb332a2 is described below

commit cb332a23ad51e738ae9a3d5fe9f39518e04194e9
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Mon Jan 7 14:48:23 2019 +0000

    Update async-http-client to 2.0.x
---
 .../main/release/samples/jax_rs/websocket/pom.xml  |  5 ++--
 .../src/main/java/demo/jaxrs/client/Client.java    |  3 +-
 .../demo/jaxrs/client/WebSocketTestClient.java     | 18 +++++------
 .../samples/jax_rs/websocket_web/README.txt        |  2 +-
 .../karaf/features/src/main/resources/features.xml | 10 +++++--
 parent/pom.xml                                     |  8 +----
 rt/transports/websocket/pom.xml                    | 13 +-------
 .../websocket/ahc/AhcWebSocketConduit.java         | 35 +++++++++++-----------
 systests/cdi/cdi-owb/pom.xml                       |  2 +-
 systests/cdi/cdi-weld/pom.xml                      |  2 +-
 systests/cdi/pom.xml                               |  8 +----
 systests/jaxrs/pom.xml                             | 13 +-------
 .../jaxrs/websocket/WebSocketTestClient.java       | 18 +++++------
 systests/jaxws/pom.xml                             | 13 +-------
 systests/rs-http-sci/pom.xml                       |  8 +----
 systests/rs-sse/pom.xml                            |  8 +----
 systests/tracing/pom.xml                           |  8 +----
 systests/transport-undertow/pom.xml                | 13 +-------
 .../websocket/WebSocketTestClient.java             | 18 +++++------
 19 files changed, 65 insertions(+), 140 deletions(-)

diff --git a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
index 123e622..6ce032b 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
@@ -31,11 +31,10 @@
     <properties>
         <cxf.version>${project.version}</cxf.version>
         <!-- TODO remove these local entries after making the referenced dependency managed
in parent/pom.xml -->
-        <cxf.ahc.version>1.9.40</cxf.ahc.version>
+        <cxf.ahc.version>2.0.39</cxf.ahc.version>
         <cxf.jetty8.version>8.1.22.v20160922</cxf.jetty8.version>
         <cxf.jetty9.version>9.4.12.v20180830</cxf.jetty9.version>
         <cxf.jetty.version>${cxf.jetty8.version}</cxf.jetty.version>
-        <cxf.netty3.version>3.9.1.Final</cxf.netty3.version>
     </properties>
     <profiles>
         <profile>
@@ -188,7 +187,7 @@
             <artifactId>jakarta.ws.rs-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
         </dependency>
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
index 0237e6f..daeb5cc 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/Client.java
@@ -81,7 +81,8 @@ public final class Client {
         // Sent GET request to monitor the customer activities
         client2.reset(1);
         System.out.println("Sent GET request to monitor activities");
-        client2.sendTextMessage("GET " + Server.CONTEXT_PATH + "/customerservice/monitor");
+        client2.sendTextMessage("GET " + Server.CONTEXT_PATH + "/customerservice/monitor\r\n"
+        		+ "Accept: text/xml; charset=ISO-8859-1\r\n");
         client2.await(5);
         responses = client2.getReceivedResponses();
         System.out.println(responses.get(0));
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/WebSocketTestClient.java
b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/WebSocketTestClient.java
index a2cb3b6..15e43f2 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/WebSocketTestClient.java
+++ b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/client/WebSocketTestClient.java
@@ -29,15 +29,13 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Logger;
 
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.ws.WebSocket;
-import com.ning.http.client.ws.WebSocketByteListener;
-import com.ning.http.client.ws.WebSocketTextListener;
-import com.ning.http.client.ws.WebSocketUpgradeHandler;
-
 import org.apache.cxf.common.logging.LogUtils;
-
-
+import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClient;
+import org.asynchttpclient.ws.WebSocket;
+import org.asynchttpclient.ws.WebSocketByteListener;
+import org.asynchttpclient.ws.WebSocketTextListener;
+import org.asynchttpclient.ws.WebSocketUpgradeHandler;
 
 /**
  * Test client to do websocket calls.
@@ -60,7 +58,7 @@ class WebSocketTestClient {
         this.received = new ArrayList<>();
         this.fragments = new ArrayList<>();
         this.latch = new CountDownLatch(1);
-        this.client = new AsyncHttpClient();
+        this.client = new DefaultAsyncHttpClient();
         this.url = url;
     }
 
@@ -99,7 +97,7 @@ class WebSocketTestClient {
         return responses;
     }
 
-    public void close() {
+    public void close() throws IOException {
         websocket.close();
         client.close();
     }
diff --git a/distribution/src/main/release/samples/jax_rs/websocket_web/README.txt b/distribution/src/main/release/samples/jax_rs/websocket_web/README.txt
index 36008ed..7d41f61 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket_web/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/websocket_web/README.txt
@@ -27,6 +27,6 @@ To run the war file using tomcat7
 To remove the target dir, run mvn clean".
 
 
-You can use the same clients included in JAX-RS WebSockt Demo.
+You can use the same clients included in JAX-RS WebSocket Demo.
 Refer to samples/jax_rs/websocket/README.txt for more information.
 
diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml
index bb9f290..4261890 100644
--- a/osgi/karaf/features/src/main/resources/features.xml
+++ b/osgi/karaf/features/src/main/resources/features.xml
@@ -392,8 +392,14 @@
     </feature>
     <feature name="cxf-transports-websocket-client" version="${project.version}">
         <feature version="${project.version}">cxf-http</feature>
-        <bundle dependency='true'>mvn:com.ning/async-http-client/${cxf.ahc.version}</bundle>
-        <bundle dependency='true'>mvn:io.netty/netty/${cxf.netty3.version}</bundle>
+        <feature prerequisite="true">wrap</feature>
+        <bundle dependency='true'>wrap:mvn:org.asynchttpclient/async-http-client/${cxf.ahc.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-common/${cxf.netty.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-handler/${cxf.netty.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-buffer/${cxf.netty.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-transport/${cxf.netty.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-codec/${cxf.netty.version}</bundle>
+        <bundle dependency='true'>mvn:io.netty/netty-codec-http/${cxf.netty.version}</bundle>
         <bundle start-level="40">mvn:org.apache.cxf/cxf-rt-transports-websocket/${project.version}</bundle>
     </feature>
     <feature name="cxf-transports-websocket-server" version="${project.version}">
diff --git a/parent/pom.xml b/parent/pom.xml
index 5636996..8b50a8a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -72,7 +72,7 @@
         <cxf.abdera.osgi.version>1.1.3_2</cxf.abdera.osgi.version>
         <cxf.activemq.version>5.14.5</cxf.activemq.version><!-- >=5.15.0
causes org.apache.cxf.osgi.itests.soap.JmsServiceTest failure -->
         <cxf.artemis.version>2.4.0</cxf.artemis.version>
-        <cxf.ahc.version>1.9.40</cxf.ahc.version>
+        <cxf.ahc.version>2.0.39</cxf.ahc.version>
         <cxf.apacheds.version>2.0.0.AM25</cxf.apacheds.version>
         <cxf.atmosphere.version>2.5.2</cxf.atmosphere.version>
         <cxf.atmosphere.version.range>[2.4,3.0)</cxf.atmosphere.version.range>
@@ -138,7 +138,6 @@
         <cxf.msv.version>2013.6.1</cxf.msv.version>
         <cxf.neethi.version>3.1.1</cxf.neethi.version>
         <cxf.netty.version>4.0.56.Final</cxf.netty.version>
-        <cxf.netty3.version>3.10.6.Final</cxf.netty3.version>
         <cxf.netty.version.range>[4,5)</cxf.netty.version.range>
         <cxf.oauth.bundle.version>20100527_1</cxf.oauth.bundle.version>
         <cxf.oauth.version>20100527</cxf.oauth.version>
@@ -1433,11 +1432,6 @@
                 <version>${cxf.reactor.version}</version>
             </dependency>
             <dependency>
-                <groupId>io.netty</groupId>
-                <artifactId>netty</artifactId>
-                <version>${cxf.netty3.version}</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.derby</groupId>
                 <artifactId>derby</artifactId>
                 <version>${cxf.derby.version}</version>
diff --git a/rt/transports/websocket/pom.xml b/rt/transports/websocket/pom.xml
index 34d5ca6..914c58b 100644
--- a/rt/transports/websocket/pom.xml
+++ b/rt/transports/websocket/pom.xml
@@ -199,21 +199,10 @@
             <artifactId>${cxf.servlet-api.artifact}</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <optional>true</optional>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
index 8e92be3..1186b2b 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java
@@ -33,15 +33,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.AsyncHttpClientConfig;
-import com.ning.http.client.Realm.AuthScheme;
-import com.ning.http.client.Realm.RealmBuilder;
-import com.ning.http.client.ws.WebSocket;
-import com.ning.http.client.ws.WebSocketByteListener;
-import com.ning.http.client.ws.WebSocketTextListener;
-import com.ning.http.client.ws.WebSocketUpgradeHandler;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -56,6 +47,16 @@ import org.apache.cxf.transport.websocket.WebSocketConstants;
 import org.apache.cxf.transport.websocket.WebSocketUtils;
 import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.AsyncHttpClientConfig;
+import org.asynchttpclient.DefaultAsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClientConfig;
+import org.asynchttpclient.Realm;
+import org.asynchttpclient.Realm.AuthScheme;
+import org.asynchttpclient.ws.WebSocket;
+import org.asynchttpclient.ws.WebSocketByteListener;
+import org.asynchttpclient.ws.WebSocketTextListener;
+import org.asynchttpclient.ws.WebSocketUpgradeHandler;
 
 /**
  *
@@ -101,28 +102,26 @@ public class AhcWebSocketConduit extends URLConnectionHTTPConduit {
 
 
     }
-    
+
     private synchronized AsyncHttpClient getAsyncHttpClient(Message message) {
         if (ahcclient == null) {
-            AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder();
+            DefaultAsyncHttpClientConfig.Builder builder = new DefaultAsyncHttpClientConfig.Builder();
             AuthorizationPolicy ap = getEffectiveAuthPolicy(message);
-            if (ap != null 
+            if (ap != null
                 && (!StringUtils.isEmpty(ap.getAuthorizationType())
                     || !StringUtils.isEmpty(ap.getUserName()))) {
-                RealmBuilder rb = new RealmBuilder();
+                Realm.Builder rb = new Realm.Builder(ap.getUserName(), ap.getPassword());
                 if (ap.getAuthorizationType() == null) {
                     rb.setScheme(AuthScheme.BASIC);
                 } else {
                     rb.setScheme(AuthScheme.valueOf(ap.getAuthorizationType().toUpperCase()));
                 }
                 rb.setUsePreemptiveAuth(true);
-                rb.setPassword(ap.getPassword())
-                    .setPrincipal(ap.getUserName());
                 builder.setRealm(rb.build());
             }
-            
+
             AsyncHttpClientConfig config = builder.build();
-            ahcclient = new AsyncHttpClient(config);
+            ahcclient = new DefaultAsyncHttpClient(config);
         }
         return ahcclient;
     }
@@ -131,7 +130,7 @@ public class AhcWebSocketConduit extends URLConnectionHTTPConduit {
     protected OutputStream createOutputStream(Message message, boolean needToCacheRequest,
                                               boolean isChunking, int chunkThreshold) throws
IOException {
 
-        
+
         AhcWebSocketConduitRequest entity = message.get(AhcWebSocketConduitRequest.class);
         return new AhcWebSocketWrappedOutputStream(message, needToCacheRequest, isChunking,
chunkThreshold,
                                                    getConduitName(), entity.getUri());
diff --git a/systests/cdi/cdi-owb/pom.xml b/systests/cdi/cdi-owb/pom.xml
index f788794..378ef2c 100644
--- a/systests/cdi/cdi-owb/pom.xml
+++ b/systests/cdi/cdi-owb/pom.xml
@@ -130,7 +130,7 @@
             <artifactId>httpclient</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
         </dependency>
     </dependencies>
diff --git a/systests/cdi/cdi-weld/pom.xml b/systests/cdi/cdi-weld/pom.xml
index faa9f9a..d023001 100644
--- a/systests/cdi/cdi-weld/pom.xml
+++ b/systests/cdi/cdi-weld/pom.xml
@@ -105,7 +105,7 @@
             <artifactId>httpclient</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
         </dependency>
         <dependency>
diff --git a/systests/cdi/pom.xml b/systests/cdi/pom.xml
index 85effbc..4b8f0bf 100644
--- a/systests/cdi/pom.xml
+++ b/systests/cdi/pom.xml
@@ -127,16 +127,10 @@
                 <version>${cxf.tomcat.version}</version>
             </dependency>
             <dependency>
-                <groupId>com.ning</groupId>
+                <groupId>org.asynchttpclient</groupId>
                 <artifactId>async-http-client</artifactId>
                 <version>${cxf.ahc.version}</version>
                 <scope>test</scope>
-                <exclusions>
-                    <exclusion>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty</artifactId>
-                    </exclusion>
-                </exclusions>
             </dependency>
         </dependencies>
     </dependencyManagement>
diff --git a/systests/jaxrs/pom.xml b/systests/jaxrs/pom.xml
index 9c6d09a..5478adb 100644
--- a/systests/jaxrs/pom.xml
+++ b/systests/jaxrs/pom.xml
@@ -472,21 +472,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <scope>test</scope>
         </dependency>
          <dependency>
             <groupId>org.apache.lucene</groupId>
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/WebSocketTestClient.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/WebSocketTestClient.java
index aea4037..2b8eaba 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/WebSocketTestClient.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/WebSocketTestClient.java
@@ -30,16 +30,14 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Logger;
 
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.ws.WebSocket;
-import com.ning.http.client.ws.WebSocketByteListener;
-import com.ning.http.client.ws.WebSocketTextListener;
-import com.ning.http.client.ws.WebSocketUpgradeHandler;
-
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.transport.websocket.WebSocketConstants;
-
-
+import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClient;
+import org.asynchttpclient.ws.WebSocket;
+import org.asynchttpclient.ws.WebSocketByteListener;
+import org.asynchttpclient.ws.WebSocketTextListener;
+import org.asynchttpclient.ws.WebSocketUpgradeHandler;
 
 /**
  * Test client to do websocket calls.
@@ -62,7 +60,7 @@ class WebSocketTestClient {
         this.received = Collections.synchronizedList(new ArrayList<>());
         this.fragments = Collections.synchronizedList(new ArrayList<>());
         this.latch = new CountDownLatch(1);
-        this.client = new AsyncHttpClient();
+        this.client = new DefaultAsyncHttpClient();
         this.url = url;
     }
 
@@ -104,7 +102,7 @@ class WebSocketTestClient {
         return responses;
     }
 
-    public void close() {
+    public void close() throws IOException {
         if (websocket != null) {
             websocket.close();
         }
diff --git a/systests/jaxws/pom.xml b/systests/jaxws/pom.xml
index 37e44e4..87c68ca 100644
--- a/systests/jaxws/pom.xml
+++ b/systests/jaxws/pom.xml
@@ -256,21 +256,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.littleshoot</groupId>
diff --git a/systests/rs-http-sci/pom.xml b/systests/rs-http-sci/pom.xml
index 8f6621e..d87ca9c 100644
--- a/systests/rs-http-sci/pom.xml
+++ b/systests/rs-http-sci/pom.xml
@@ -114,16 +114,10 @@
             <scope>test</scope>
         </dependency>              
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
     </dependencies>
     <build>
diff --git a/systests/rs-sse/pom.xml b/systests/rs-sse/pom.xml
index 0da90a5..a3cfb53 100644
--- a/systests/rs-sse/pom.xml
+++ b/systests/rs-sse/pom.xml
@@ -80,16 +80,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
     </dependencies>
     
diff --git a/systests/tracing/pom.xml b/systests/tracing/pom.xml
index 5a3b01a..4b23522c 100644
--- a/systests/tracing/pom.xml
+++ b/systests/tracing/pom.xml
@@ -120,16 +120,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.jaegertracing</groupId>
diff --git a/systests/transport-undertow/pom.xml b/systests/transport-undertow/pom.xml
index 04a07ef..591a279 100644
--- a/systests/transport-undertow/pom.xml
+++ b/systests/transport-undertow/pom.xml
@@ -133,21 +133,10 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>com.ning</groupId>
+            <groupId>org.asynchttpclient</groupId>
             <artifactId>async-http-client</artifactId>
             <version>${cxf.ahc.version}</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.netty</groupId>
-                    <artifactId>netty</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>org.codehaus.jettison</groupId>
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
index 37eccf1..4bb5ca4 100644
--- a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
@@ -31,16 +31,14 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Logger;
 
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.ws.WebSocket;
-import com.ning.http.client.ws.WebSocketByteListener;
-import com.ning.http.client.ws.WebSocketTextListener;
-import com.ning.http.client.ws.WebSocketUpgradeHandler;
-
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.transport.websocket.WebSocketConstants;
-
-
+import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClient;
+import org.asynchttpclient.ws.WebSocket;
+import org.asynchttpclient.ws.WebSocketByteListener;
+import org.asynchttpclient.ws.WebSocketTextListener;
+import org.asynchttpclient.ws.WebSocketUpgradeHandler;
 
 /**
  * Test client to do websocket calls.
@@ -63,7 +61,7 @@ class WebSocketTestClient {
         this.received = Collections.synchronizedList(new ArrayList<>());
         this.fragments = Collections.synchronizedList(new ArrayList<>());
         this.latch = new CountDownLatch(1);
-        this.client = new AsyncHttpClient();
+        this.client = new DefaultAsyncHttpClient();
         this.url = url;
     }
 
@@ -105,7 +103,7 @@ class WebSocketTestClient {
         return responses;
     }
 
-    public void close() {
+    public void close() throws IOException {
         if (websocket != null) {
             websocket.close();
         }


Mime
View raw message