You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ay...@apache.org on 2015/07/10 10:11:46 UTC
camel git commit: CAMEL-8893: Upgradd to CXF 3.1.x
Repository: camel
Updated Branches:
refs/heads/master da10aa5b0 -> 6a72cf18d
CAMEL-8893: Upgradd to CXF 3.1.x
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6a72cf18
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a72cf18
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a72cf18
Branch: refs/heads/master
Commit: 6a72cf18dfd932a5f5f788e7e158292a237fe890
Parents: da10aa5
Author: Akitoshi Yoshida <ay...@apache.org>
Authored: Fri Jul 10 09:55:09 2015 +0200
Committer: Akitoshi Yoshida <ay...@apache.org>
Committed: Fri Jul 10 09:56:36 2015 +0200
----------------------------------------------------------------------
components/camel-cxf/pom.xml | 2 +-
.../camel/component/cxf/CxfConsumerPayloadTest.java | 7 +++++--
.../cxf/CxfPayloadRouterContentLengthTest.java | 14 +++++++++++---
.../cxf/soap/headers/CxfMessageHeadersRelayTest.java | 4 +++-
parent/pom.xml | 4 ++--
5 files changed, 22 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6a72cf18/components/camel-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-cxf/pom.xml b/components/camel-cxf/pom.xml
index e8787ca..ae34eee 100644
--- a/components/camel-cxf/pom.xml
+++ b/components/camel-cxf/pom.xml
@@ -210,7 +210,7 @@
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-jetty8</artifactId>
+ <artifactId>camel-jetty9</artifactId>
<scope>test</scope>
</dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/6a72cf18/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
index ad3a5fe..a981839 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
@@ -47,10 +47,13 @@ public class CxfConsumerPayloadTest extends CxfConsumerMessageTest {
protected static final String ELEMENT_NAMESPACE = "http://cxf.component.camel.apache.org/";
protected void checkRequest(String expect, String request) {
+ //REVIST use a more reliable comparison to tolerate some namespaces being added to the root element
if (expect.equals("ECHO_REQUEST")) {
- assertEquals("Get a wrong request", ECHO_REQUEST, request);
+ assertTrue("Get a wrong request", request.startsWith(ECHO_REQUEST.substring(0, 60))
+ && request.endsWith(ECHO_REQUEST.substring(61)));
} else {
- assertEquals("Get a wrong request", ECHO_BOOLEAN_REQUEST, request);
+ assertTrue("Get a wrong request", request.startsWith(ECHO_BOOLEAN_REQUEST.substring(0, 67))
+ && request.endsWith(ECHO_BOOLEAN_REQUEST.substring(68)));
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/6a72cf18/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadRouterContentLengthTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadRouterContentLengthTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadRouterContentLengthTest.java
index 14b866a..c894e7d 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadRouterContentLengthTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadRouterContentLengthTest.java
@@ -38,8 +38,11 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.junit.After;
import org.junit.Before;
@@ -90,7 +93,13 @@ public class CxfPayloadRouterContentLengthTest extends CamelTestSupport {
* Content-Length but no other header
*/
log.info("Starting jetty server at port {}", JETTY_PORT);
- server = new Server(JETTY_PORT);
+ server = new Server();
+ // Do not send a Server header
+ HttpConfiguration httpconf = new HttpConfiguration();
+ httpconf.setSendServerVersion(false);
+ ServerConnector http = new ServerConnector(server, new HttpConnectionFactory(httpconf));
+ http.setPort(JETTY_PORT);
+ server.addConnector(http);
server.setHandler(new AbstractHandler() {
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
@@ -105,8 +114,7 @@ public class CxfPayloadRouterContentLengthTest extends CamelTestSupport {
pw.close();
}
});
- // Do not send a Server header
- server.setSendServerVersion(false);
+
server.start();
// Load the CXF endpoints for the route
log.info("Start Routing Scenario at port {}", CXFTestSupport.getPort1());
http://git-wip-us.apache.org/repos/asf/camel/blob/6a72cf18/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
index 4f0ab7c..696eadd 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
@@ -440,7 +440,9 @@ public class CxfMessageHeadersRelayTest extends AbstractJUnit4SpringContextTests
+ "component/cxf/soap/headers\"><responseType>pass</responseType>"
+ "</ns2:inoutHeaderResponse>";
String response = StaxUtils.toString(out.getBody().get(0));
- assertTrue(response, response.contains(responseExp));
+ //REVISIT use a more reliable comparison to tolerate some namespaces being added to the root element
+ assertTrue(response, response.startsWith(responseExp.substring(0, 87))
+ && response.endsWith(responseExp.substring(88, responseExp.length())));
}
@Test
http://git-wip-us.apache.org/repos/asf/camel/blob/6a72cf18/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4aa27bd..d12521e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -122,9 +122,9 @@
<commons-vfs2-version>2.0</commons-vfs2-version>
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
<cobertura-maven-plugin-version>2.7</cobertura-maven-plugin-version>
- <cxf-version>3.0.4</cxf-version>
+ <cxf-version>3.1.1</cxf-version>
<cxf-version-range>[2.7,4.0)</cxf-version-range>
- <cxf-xjc-utils-version>3.0.2</cxf-xjc-utils-version>
+ <cxf-xjc-utils-version>3.0.3</cxf-xjc-utils-version>
<deltaspike-version>1.4.1</deltaspike-version>
<derby-version>10.11.1.1</derby-version>
<disruptor-version>3.3.2</disruptor-version>