You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/10/20 10:40:43 UTC
[1/4] git commit: CAMEL-6243 Fixed the NPE of ClientFaultConverter
when receiving a soapfault with the CFX_MESSAGE dataformat
Updated Branches:
refs/heads/camel-2.10.x 013e4058c -> ec779785b
refs/heads/camel-2.11.x fb7f81060 -> c5a527878
refs/heads/camel-2.12.x 3898461a3 -> 0c73ad9fd
CAMEL-6243 Fixed the NPE of ClientFaultConverter when receiving a soapfault with the CFX_MESSAGE dataformat
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0c73ad9f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0c73ad9f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0c73ad9f
Branch: refs/heads/camel-2.12.x
Commit: 0c73ad9fd2eb23c2600fac50dda390835b3ca51e
Parents: 3898461
Author: Willem Jiang <ni...@apache.org>
Authored: Sun Oct 20 16:25:52 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Sun Oct 20 16:29:46 2013 +0800
----------------------------------------------------------------------
.../cxf/feature/AbstractDataFormatFeature.java | 17 +++++++
.../feature/CXFMessageDataFormatFeature.java | 1 +
.../cxf/feature/PayLoadDataFormatFeature.java | 11 +----
.../cxf/CxfGreeterCXFMessageRouterTest.java | 2 +
...xfGreeterCXFMessageWithoutSEIRouterTest.java | 50 ++++++++++++++++++++
...GreeterEndpointCxfMessageWithoutSEIBeans.xml | 47 ++++++++++++++++++
6 files changed, 118 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
index 92acf64..857b532 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
@@ -17,12 +17,15 @@
package org.apache.camel.component.cxf.feature;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.apache.cxf.endpoint.Client;
import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.ClientFaultConverter;
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.PhaseInterceptor;
@@ -32,11 +35,18 @@ import org.slf4j.Logger;
* The abstract class for the data format feature
*/
public abstract class AbstractDataFormatFeature extends AbstractFeature {
+ protected static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
+
+ static {
+ REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
+ REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
+ }
// The interceptors which need to be keeped
protected Set<String> inInterceptorNames = new HashSet<String>();
protected Set<String> outInterceptorNames = new HashSet<String>();
protected abstract Logger getLogger();
+
@Deprecated
// It will be removed in Camel 3.0
@@ -116,6 +126,13 @@ public abstract class AbstractDataFormatFeature extends AbstractFeature {
}
}
+ protected void removeFaultInInterceptorFromClient(Client client) {
+ removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ }
+
public void addInIntercepters(List<Interceptor<? extends Message>> interceptors) {
for (Interceptor<? extends Message> interceptor : interceptors) {
inInterceptorNames.add(interceptor.getClass().getName());
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
index e80d985..b585281 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
@@ -69,6 +69,7 @@ public class CXFMessageDataFormatFeature extends AbstractDataFormatFeature {
@Override
public void initialize(Client client, Bus bus) {
+ removeFaultInInterceptorFromClient(client);
setupEndpoint(client.getEndpoint());
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
index dae5b86..e9efdd4 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
@@ -44,11 +44,8 @@ import org.slf4j.LoggerFactory;
*/
public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
private static final Logger LOG = LoggerFactory.getLogger(PayLoadDataFormatFeature.class);
- private static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
private static final boolean DEFAULT_ALLOW_STREAMING;
static {
- REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
- REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
String s = System.getProperty("org.apache.camel.component.cxf.streaming");
DEFAULT_ALLOW_STREAMING = s == null || Boolean.parseBoolean(s);
@@ -167,11 +164,5 @@ public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
}
}
}
- private void removeFaultInInterceptorFromClient(Client client) {
- removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- }
-
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
index 0b7283a..5368b3e 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf;
import javax.xml.ws.Endpoint;
+import org.apache.camel.builder.NoErrorHandlerBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.hello_world_soap_http.GreeterImpl;
import org.junit.AfterClass;
@@ -47,6 +48,7 @@ public class CxfGreeterCXFMessageRouterTest extends AbstractCXFGreeterRouterTest
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
+ context.setErrorHandlerBuilder(new NoErrorHandlerBuilder());
from("cxf:bean:routerEndpoint?dataFormat=CXF_MESSAGE&publishedEndpointUrl=http://www.simple.com/services/test")
.to("cxf:bean:serviceEndpoint?dataFormat=CXF_MESSAGE");
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
new file mode 100644
index 0000000..cbc809f
--- /dev/null
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.camel.component.cxf;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class CxfGreeterCXFMessageWithoutSEIRouterTest extends CxfGreeterCXFMessageRouterTest {
+
+ protected static Endpoint endpoint;
+ @AfterClass
+ public static void stopService() {
+ if (endpoint != null) {
+ endpoint.stop();
+ }
+ }
+
+
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new GreeterImpl();
+ String address = "http://localhost:" + getPort1()
+ + "/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort";
+ endpoint = Endpoint.publish(address, implementor);
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0c73ad9f/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
new file mode 100644
index 0000000..5d91e8d
--- /dev/null
+++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://camel.apache.org/schema/cxf"
+
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ ">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CXFTestSupport.port2}/CxfGreeterCXFMessageWithoutSEIRouterTest/CamelContext/RouterPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http"
+ loggingFeatureEnabled="true">
+ </cxf:cxfEndpoint>
+
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CXFTestSupport.port1}/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http" >
+
+ </cxf:cxfEndpoint>
+
+</beans>
\ No newline at end of file
[2/4] git commit: CAMEL-6243 Fixed the NPE of ClientFaultConverter
when receiving a soapfault with the CFX_MESSAGE dataformat
Posted by ni...@apache.org.
CAMEL-6243 Fixed the NPE of ClientFaultConverter when receiving a soapfault with the CFX_MESSAGE dataformat
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c5a52787
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c5a52787
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c5a52787
Branch: refs/heads/camel-2.11.x
Commit: c5a527878e0b91f16ee11eb94072e9a616d5151f
Parents: fb7f810
Author: Willem Jiang <ni...@apache.org>
Authored: Sun Oct 20 16:25:52 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Sun Oct 20 16:30:37 2013 +0800
----------------------------------------------------------------------
.../cxf/feature/AbstractDataFormatFeature.java | 17 +++++++
.../feature/CXFMessageDataFormatFeature.java | 1 +
.../cxf/feature/PayLoadDataFormatFeature.java | 11 +----
.../cxf/CxfGreeterCXFMessageRouterTest.java | 2 +
...xfGreeterCXFMessageWithoutSEIRouterTest.java | 50 ++++++++++++++++++++
...GreeterEndpointCxfMessageWithoutSEIBeans.xml | 47 ++++++++++++++++++
6 files changed, 118 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
index 92acf64..857b532 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
@@ -17,12 +17,15 @@
package org.apache.camel.component.cxf.feature;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.apache.cxf.endpoint.Client;
import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.ClientFaultConverter;
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.PhaseInterceptor;
@@ -32,11 +35,18 @@ import org.slf4j.Logger;
* The abstract class for the data format feature
*/
public abstract class AbstractDataFormatFeature extends AbstractFeature {
+ protected static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
+
+ static {
+ REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
+ REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
+ }
// The interceptors which need to be keeped
protected Set<String> inInterceptorNames = new HashSet<String>();
protected Set<String> outInterceptorNames = new HashSet<String>();
protected abstract Logger getLogger();
+
@Deprecated
// It will be removed in Camel 3.0
@@ -116,6 +126,13 @@ public abstract class AbstractDataFormatFeature extends AbstractFeature {
}
}
+ protected void removeFaultInInterceptorFromClient(Client client) {
+ removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ }
+
public void addInIntercepters(List<Interceptor<? extends Message>> interceptors) {
for (Interceptor<? extends Message> interceptor : interceptors) {
inInterceptorNames.add(interceptor.getClass().getName());
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
index e80d985..b585281 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
@@ -69,6 +69,7 @@ public class CXFMessageDataFormatFeature extends AbstractDataFormatFeature {
@Override
public void initialize(Client client, Bus bus) {
+ removeFaultInInterceptorFromClient(client);
setupEndpoint(client.getEndpoint());
}
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
index dae5b86..e9efdd4 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
@@ -44,11 +44,8 @@ import org.slf4j.LoggerFactory;
*/
public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
private static final Logger LOG = LoggerFactory.getLogger(PayLoadDataFormatFeature.class);
- private static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
private static final boolean DEFAULT_ALLOW_STREAMING;
static {
- REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
- REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
String s = System.getProperty("org.apache.camel.component.cxf.streaming");
DEFAULT_ALLOW_STREAMING = s == null || Boolean.parseBoolean(s);
@@ -167,11 +164,5 @@ public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
}
}
}
- private void removeFaultInInterceptorFromClient(Client client) {
- removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- }
-
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
index 0b7283a..5368b3e 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf;
import javax.xml.ws.Endpoint;
+import org.apache.camel.builder.NoErrorHandlerBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.hello_world_soap_http.GreeterImpl;
import org.junit.AfterClass;
@@ -47,6 +48,7 @@ public class CxfGreeterCXFMessageRouterTest extends AbstractCXFGreeterRouterTest
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
+ context.setErrorHandlerBuilder(new NoErrorHandlerBuilder());
from("cxf:bean:routerEndpoint?dataFormat=CXF_MESSAGE&publishedEndpointUrl=http://www.simple.com/services/test")
.to("cxf:bean:serviceEndpoint?dataFormat=CXF_MESSAGE");
}
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
new file mode 100644
index 0000000..cbc809f
--- /dev/null
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.camel.component.cxf;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class CxfGreeterCXFMessageWithoutSEIRouterTest extends CxfGreeterCXFMessageRouterTest {
+
+ protected static Endpoint endpoint;
+ @AfterClass
+ public static void stopService() {
+ if (endpoint != null) {
+ endpoint.stop();
+ }
+ }
+
+
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new GreeterImpl();
+ String address = "http://localhost:" + getPort1()
+ + "/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort";
+ endpoint = Endpoint.publish(address, implementor);
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a52787/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
new file mode 100644
index 0000000..5d91e8d
--- /dev/null
+++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://camel.apache.org/schema/cxf"
+
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ ">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CXFTestSupport.port2}/CxfGreeterCXFMessageWithoutSEIRouterTest/CamelContext/RouterPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http"
+ loggingFeatureEnabled="true">
+ </cxf:cxfEndpoint>
+
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CXFTestSupport.port1}/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http" >
+
+ </cxf:cxfEndpoint>
+
+</beans>
\ No newline at end of file
[4/4] git commit: CAMEL-6243 Fixed the NPE of ClientFaultConverter
when receiving a soapfault with the CFX_MESSAGE dataformat
Posted by ni...@apache.org.
CAMEL-6243 Fixed the NPE of ClientFaultConverter when receiving a soapfault with the CFX_MESSAGE dataformat
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ec779785
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ec779785
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ec779785
Branch: refs/heads/camel-2.10.x
Commit: ec779785b97b740d3e336574c6527aba94d31b1e
Parents: 422d3f3
Author: Willem Jiang <ni...@apache.org>
Authored: Sun Oct 20 16:25:52 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Sun Oct 20 16:31:41 2013 +0800
----------------------------------------------------------------------
.../cxf/feature/AbstractDataFormatFeature.java | 17 +++++++
.../feature/CXFMessageDataFormatFeature.java | 1 +
.../cxf/feature/PayLoadDataFormatFeature.java | 11 +----
.../cxf/CxfGreeterCXFMessageRouterTest.java | 2 +
...xfGreeterCXFMessageWithoutSEIRouterTest.java | 50 ++++++++++++++++++++
...GreeterEndpointCxfMessageWithoutSEIBeans.xml | 47 ++++++++++++++++++
6 files changed, 118 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
index 92acf64..857b532 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/AbstractDataFormatFeature.java
@@ -17,12 +17,15 @@
package org.apache.camel.component.cxf.feature;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.apache.cxf.endpoint.Client;
import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.ClientFaultConverter;
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.PhaseInterceptor;
@@ -32,11 +35,18 @@ import org.slf4j.Logger;
* The abstract class for the data format feature
*/
public abstract class AbstractDataFormatFeature extends AbstractFeature {
+ protected static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
+
+ static {
+ REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
+ REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
+ }
// The interceptors which need to be keeped
protected Set<String> inInterceptorNames = new HashSet<String>();
protected Set<String> outInterceptorNames = new HashSet<String>();
protected abstract Logger getLogger();
+
@Deprecated
// It will be removed in Camel 3.0
@@ -116,6 +126,13 @@ public abstract class AbstractDataFormatFeature extends AbstractFeature {
}
}
+ protected void removeFaultInInterceptorFromClient(Client client) {
+ removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
+ }
+
public void addInIntercepters(List<Interceptor<? extends Message>> interceptors) {
for (Interceptor<? extends Message> interceptor : interceptors) {
inInterceptorNames.add(interceptor.getClass().getName());
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
index ad1147d..e45df29 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
@@ -69,6 +69,7 @@ public class CXFMessageDataFormatFeature extends AbstractDataFormatFeature {
@Override
public void initialize(Client client, Bus bus) {
+ removeFaultInInterceptorFromClient(client);
setupEndpoint(client.getEndpoint());
}
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
index 4642358..bf6ec31 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
@@ -44,11 +44,8 @@ import org.slf4j.LoggerFactory;
*/
public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
private static final Logger LOG = LoggerFactory.getLogger(PayLoadDataFormatFeature.class);
- private static final Collection<Class<?>> REMOVING_FAULT_IN_INTERCEPTORS;
private static final boolean DEFAULT_ALLOW_STREAMING;
static {
- REMOVING_FAULT_IN_INTERCEPTORS = new ArrayList<Class<?>>();
- REMOVING_FAULT_IN_INTERCEPTORS.add(ClientFaultConverter.class);
String s = System.getProperty("org.apache.camel.component.cxf.streaming");
DEFAULT_ALLOW_STREAMING = s == null || Boolean.parseBoolean(s);
@@ -163,11 +160,5 @@ public class PayLoadDataFormatFeature extends AbstractDataFormatFeature {
}
}
}
- private void removeFaultInInterceptorFromClient(Client client) {
- removeInterceptors(client.getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getService().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- removeInterceptors(client.getEndpoint().getBinding().getInFaultInterceptors(), REMOVING_FAULT_IN_INTERCEPTORS);
- }
-
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
index 0b7283a..5368b3e 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageRouterTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf;
import javax.xml.ws.Endpoint;
+import org.apache.camel.builder.NoErrorHandlerBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.hello_world_soap_http.GreeterImpl;
import org.junit.AfterClass;
@@ -47,6 +48,7 @@ public class CxfGreeterCXFMessageRouterTest extends AbstractCXFGreeterRouterTest
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
+ context.setErrorHandlerBuilder(new NoErrorHandlerBuilder());
from("cxf:bean:routerEndpoint?dataFormat=CXF_MESSAGE&publishedEndpointUrl=http://www.simple.com/services/test")
.to("cxf:bean:serviceEndpoint?dataFormat=CXF_MESSAGE");
}
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
new file mode 100644
index 0000000..cbc809f
--- /dev/null
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterCXFMessageWithoutSEIRouterTest.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.camel.component.cxf;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class CxfGreeterCXFMessageWithoutSEIRouterTest extends CxfGreeterCXFMessageRouterTest {
+
+ protected static Endpoint endpoint;
+ @AfterClass
+ public static void stopService() {
+ if (endpoint != null) {
+ endpoint.stop();
+ }
+ }
+
+
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new GreeterImpl();
+ String address = "http://localhost:" + getPort1()
+ + "/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort";
+ endpoint = Endpoint.publish(address, implementor);
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/ec779785/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
new file mode 100644
index 0000000..5d91e8d
--- /dev/null
+++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://camel.apache.org/schema/cxf"
+
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ ">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:${CXFTestSupport.port2}/CxfGreeterCXFMessageWithoutSEIRouterTest/CamelContext/RouterPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http"
+ loggingFeatureEnabled="true">
+ </cxf:cxfEndpoint>
+
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CXFTestSupport.port1}/CxfGreeterCXFMessageWithoutSEIRouterTest/SoapContext/SoapPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http" >
+
+ </cxf:cxfEndpoint>
+
+</beans>
\ No newline at end of file
[3/4] git commit: Fixed the BlueprintPackageScan2Test
Posted by ni...@apache.org.
Fixed the BlueprintPackageScan2Test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/422d3f3e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/422d3f3e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/422d3f3e
Branch: refs/heads/camel-2.10.x
Commit: 422d3f3eee85d9b4de7881f4df9c5a449d8befef
Parents: 013e405
Author: Willem Jiang <ni...@apache.org>
Authored: Sun Oct 20 10:57:38 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Sun Oct 20 16:31:31 2013 +0800
----------------------------------------------------------------------
.../org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java | 2 --
.../resources/org/apache/camel/test/blueprint/packagescan2.xml | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/422d3f3e/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
index fae9828..86e0b18 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
@@ -16,13 +16,11 @@
*/
package org.apache.camel.test.blueprint;
-import org.junit.Ignore;
import org.junit.Test;
/**
*
*/
-@Ignore("Issue with @EndpointInject")
public class BlueprintPackageScan2Test extends CamelBlueprintTestSupport {
@Override
http://git-wip-us.apache.org/repos/asf/camel/blob/422d3f3e/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/packagescan2.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/packagescan2.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/packagescan2.xml
index 3100043..2ba47ff 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/packagescan2.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/packagescan2.xml
@@ -22,7 +22,7 @@
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<packageScan>
- <package>org.apache.camel.test.blueprint.scan</package>
+ <package>org.apache.camel.test.blueprint.scan2</package>
</packageScan>
<endpoint id="foo" uri="direct:start"/>