This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-19390/cxf-upgrade in repository https://gitbox.apache.org/repos/asf/camel.git
commit d6146ac95026f16f8da1d44db423727e6ac3ce28 Author: Nicolas Filotto <nfilo...@talend.com> AuthorDate: Fri May 26 14:16:17 2023 +0200 CAMEL-19390: camel-cxf - Upgrade to 3.6.1 --- camel-dependencies/pom.xml | 7 ++++--- components/camel-cxf/camel-cxf-common/pom.xml | 6 ++++++ .../component/cxf/jaxrs/CxfRsProducerHttpMethodHeaderTest.java | 2 +- .../apache/camel/component/cxf/jaxws/CxfProducerRouterTest.java | 2 +- .../java/org/apache/camel/component/cxf/jaxws/CxfProducerTest.java | 6 +++--- .../apache/camel/component/cxf/CxfMessageHeaderTimeoutTest.java | 3 ++- .../test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java | 3 ++- .../src/test/java/org/apache/camel/component/cxf/ssl/SslTest.java | 2 +- parent/pom.xml | 7 ++++--- 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index b8d199a1287..4d8ab62aa54 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -137,9 +137,9 @@ <corda-version>4.9.3</corda-version> <couchbase-client-version>3.4.1</couchbase-client-version> <curator-version>4.3.0</curator-version> - <cxf-version>3.5.5</cxf-version> - <cxf-version-range>[3.5,3.6)</cxf-version-range> - <cxf-codegen-plugin-version>3.5.5</cxf-codegen-plugin-version> + <cxf-version>3.6.0</cxf-version> + <cxf-version-range>[3.6,4.0)</cxf-version-range> + <cxf-codegen-plugin-version>3.6.0</cxf-codegen-plugin-version> <!-- cxf-xjc is not released as often --> <cxf-xjc-plugin-version>3.3.2</cxf-xjc-plugin-version> <cxf-xjc-utils-version>3.3.2</cxf-xjc-utils-version> @@ -286,6 +286,7 @@ <jakarta.el-version>3.0.3</jakarta.el-version> <jakarta-inject-version>1.0.5</jakarta-inject-version> <jakarta-jaxb-version>2.3.3</jakarta-jaxb-version> + <jakarta-xml-soap-api-version>1.4.2</jakarta-xml-soap-api-version> <javax-soap-api-version>1.4.0</javax-soap-api-version> <jaxws-api-version>2.3.0</jaxws-api-version> <glassfish-javax-json>1.0.4</glassfish-javax-json> diff --git a/components/camel-cxf/camel-cxf-common/pom.xml b/components/camel-cxf/camel-cxf-common/pom.xml index eca739653ff..d89d415878f 100644 --- a/components/camel-cxf/camel-cxf-common/pom.xml +++ b/components/camel-cxf/camel-cxf-common/pom.xml @@ -99,6 +99,12 @@ <version>${javax-servlet-api-version}</version> </dependency> + <dependency> + <groupId>jakarta.xml.soap</groupId> + <artifactId>jakarta.xml.soap-api</artifactId> + <version>${jakarta-xml-soap-api-version}</version> + </dependency> + <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-test-junit5</artifactId> diff --git a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHttpMethodHeaderTest.java b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHttpMethodHeaderTest.java index 77529efa765..7fce8db9c7d 100644 --- a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHttpMethodHeaderTest.java +++ b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHttpMethodHeaderTest.java @@ -59,7 +59,7 @@ public class CxfRsProducerHttpMethodHeaderTest extends CamelTestSupport { Response response = (Response) exchange.getMessage().getBody(); // check the response code on the Response object as set by the "HttpProcess" - assertEquals(200, response.getStatus()); + assertEquals(204, response.getStatus()); Exchange e1 = getMockEndpoint("mock:result").getReceivedExchanges().get(0); // should not contain CXF headers diff --git a/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerRouterTest.java b/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerRouterTest.java index 07187e3dd31..811fe1a8dcc 100644 --- a/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerRouterTest.java +++ b/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerRouterTest.java @@ -81,7 +81,7 @@ public class CxfProducerRouterTest extends CamelTestSupport { from("direct:start") .doTry() .to("cxf://http://localhost:10000/false?serviceClass=org.apache.camel.component.cxf.jaxws.HelloService") - .doCatch(org.apache.cxf.interceptor.Fault.class) + .doCatch(java.net.ConnectException.class) .to("mock:error"); } }; diff --git a/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerTest.java b/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerTest.java index 70e539a3bde..6b94c14bdfb 100644 --- a/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerTest.java +++ b/components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfProducerTest.java @@ -136,17 +136,17 @@ public class CxfProducerTest { public void testInvokingAWrongServer() throws Exception { Exchange reply = sendSimpleMessage(getWrongEndpointUri()); assertNotNull(reply.getException(), "We should get the exception here"); - assertTrue(reply.getException().getCause() instanceof ConnectException); + assertTrue(reply.getException() instanceof ConnectException); //Test the data format PAYLOAD reply = sendSimpleMessageWithPayloadMessage(getWrongEndpointUri() + "&dataFormat=PAYLOAD"); assertNotNull(reply.getException(), "We should get the exception here"); - assertTrue(reply.getException().getCause() instanceof ConnectException); + assertTrue(reply.getException() instanceof ConnectException); //Test the data format MESSAGE reply = sendSimpleMessageWithRawMessage(getWrongEndpointUri() + "&dataFormat=RAW"); assertNotNull(reply.getException(), "We should get the exception here"); - assertTrue(reply.getException().getCause() instanceof ConnectException); + assertTrue(reply.getException() instanceof ConnectException); } @Test diff --git a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMessageHeaderTimeoutTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMessageHeaderTimeoutTest.java index 4d989806534..b1f3d7bfcd3 100644 --- a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMessageHeaderTimeoutTest.java +++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMessageHeaderTimeoutTest.java @@ -17,6 +17,7 @@ package org.apache.camel.component.cxf; import java.net.SocketTimeoutException; +import java.net.http.HttpTimeoutException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -63,7 +64,7 @@ public class CxfMessageHeaderTimeoutTest extends CamelSpringTestSupport { Exchange reply = sendJaxWsMessage(endpointUri); Exception e = reply.getException(); assertNotNull(e, "We should get the exception cause here"); - assertTrue(e instanceof SocketTimeoutException, "We should get the socket time out exception here"); + assertTrue(e instanceof HttpTimeoutException, "We should get an http time out exception here"); } protected Exchange sendJaxWsMessage(String endpointUri) throws InterruptedException { diff --git a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java index c87e38fca98..4b3fbe569b9 100644 --- a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java +++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java @@ -17,6 +17,7 @@ package org.apache.camel.component.cxf; import java.net.SocketTimeoutException; +import java.net.http.HttpTimeoutException; import java.util.ArrayList; import java.util.List; @@ -96,7 +97,7 @@ public class CxfTimeoutTest extends CamelSpringTestSupport { Exchange reply = sendJaxWsMessage(endpointUri); Exception e = reply.getException(); assertNotNull(e, "We should get the exception cause here"); - assertTrue(e instanceof SocketTimeoutException, "We should get the socket time out exception here"); + assertTrue(e instanceof HttpTimeoutException, "We should get a http time out exception here"); } protected Exchange sendJaxWsMessage(String endpointUri) throws InterruptedException { diff --git a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/ssl/SslTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/ssl/SslTest.java index 952942ea706..27d22d99e73 100644 --- a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/ssl/SslTest.java +++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/ssl/SslTest.java @@ -73,7 +73,7 @@ public class SslTest extends CamelSpringTestSupport { public void testInvokingNoTrustRoute() throws Exception { Exchange reply = sendJaxWsMessage("direct:noTrust"); assertTrue(reply.isFailed(), "We expect the exception here"); - Throwable e = reply.getException().getCause(); + Throwable e = reply.getException(); assertEquals("javax.net.ssl.SSLHandshakeException", e.getClass().getCanonicalName()); } diff --git a/parent/pom.xml b/parent/pom.xml index 8661108697a..dc9c5501bd9 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -132,9 +132,9 @@ <corda-version>4.9.3</corda-version> <couchbase-client-version>3.4.1</couchbase-client-version> <curator-version>4.3.0</curator-version> - <cxf-version>3.5.5</cxf-version> - <cxf-version-range>[3.5,3.6)</cxf-version-range> - <cxf-codegen-plugin-version>3.5.5</cxf-codegen-plugin-version> + <cxf-version>3.6.1-SNAPSHOT</cxf-version> + <cxf-version-range>[3.6,4.0)</cxf-version-range> + <cxf-codegen-plugin-version>3.6.1-SNAPSHOT</cxf-codegen-plugin-version> <!-- cxf-xjc is not released as often --> <cxf-xjc-plugin-version>3.3.2</cxf-xjc-plugin-version> <cxf-xjc-utils-version>3.3.2</cxf-xjc-utils-version> @@ -281,6 +281,7 @@ <jakarta.el-version>3.0.3</jakarta.el-version> <jakarta-inject-version>1.0.5</jakarta-inject-version> <jakarta-jaxb-version>2.3.3</jakarta-jaxb-version> + <jakarta-xml-soap-api-version>1.4.2</jakarta-xml-soap-api-version> <javax-soap-api-version>1.4.0</javax-soap-api-version> <jaxws-api-version>2.3.0</jaxws-api-version> <glassfish-javax-json>1.0.4</glassfish-javax-json>