You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ge...@apache.org on 2015/11/26 12:42:38 UTC
camel git commit: CAMEL-9366: skipFaultLogging attribute does not
work on Spring rsClient/rsServer
Repository: camel
Updated Branches:
refs/heads/master 36297987b -> cfa51caf2
CAMEL-9366: skipFaultLogging attribute does not work on Spring rsClient/rsServer
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cfa51caf
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cfa51caf
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cfa51caf
Branch: refs/heads/master
Commit: cfa51caf21c7022a62f1bff0142eada38fa3dbdc
Parents: 3629798
Author: Gert Vanthienen <ge...@apache.org>
Authored: Thu Nov 26 12:42:20 2015 +0100
Committer: Gert Vanthienen <ge...@apache.org>
Committed: Thu Nov 26 12:42:20 2015 +0100
----------------------------------------------------------------------
.../component/cxf/spring/SpringJAXRSClientFactoryBean.java | 9 +++++++++
.../component/cxf/spring/CxfRsClientFactoryBeanTest.java | 5 +++++
.../camel/component/cxf/spring/CxfRsClientFactoryBeans.xml | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/cfa51caf/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/SpringJAXRSClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/SpringJAXRSClientFactoryBean.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/SpringJAXRSClientFactoryBean.java
index 7ed503e..3335cc5 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/SpringJAXRSClientFactoryBean.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/SpringJAXRSClientFactoryBean.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf.spring;
import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.apache.camel.component.cxf.NullFaultListener;
import org.apache.camel.component.cxf.jaxrs.BeanIdAware;
@@ -105,4 +106,12 @@ public class SpringJAXRSClientFactoryBean extends JAXRSClientFactoryBean
this.getProperties().put(FaultListener.class.getName(), new NullFaultListener());
}
}
+
+ public void setProperties(Map<String, Object> properties) {
+ if (this.getProperties() != null && properties != null) {
+ this.getProperties().putAll(properties);
+ } else {
+ super.setProperties(properties);
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/cfa51caf/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
index 9d543e2..b5f9240 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
@@ -17,7 +17,9 @@
package org.apache.camel.component.cxf.spring;
import org.apache.camel.component.cxf.CXFTestSupport;
+import org.apache.camel.component.cxf.NullFaultListener;
import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
+import org.apache.cxf.logging.FaultListener;
import org.junit.Test;
public class CxfRsClientFactoryBeanTest extends AbstractSpringBeanTestSupport {
@@ -41,6 +43,9 @@ public class CxfRsClientFactoryBeanTest extends AbstractSpringBeanTestSupport {
assertEquals("Got the wrong schemalocation", "classpath:wsdl/Message.xsd", cfb.getSchemaLocations().get(0));
assertEquals("Got the wrong loggingFeatureEnabled", true, cfb.isLoggingFeatureEnabled());
assertEquals("Got the wrong loggingSizeLimit", 200, cfb.getLoggingSizeLimit());
+ Object listener = cfb.getProperties().get(FaultListener.class.getName());
+ assertTrue("NullFaultListener was not added to the properties", listener instanceof NullFaultListener);
}
}
+
http://git-wip-us.apache.org/repos/asf/camel/blob/cfa51caf/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
index c9929ae..156bf88 100644
--- a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
+++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
@@ -28,7 +28,7 @@
<cxf:rsClient id="rsClient1" address="http://localhost:${CXFTestSupport.port1}/CxfRsClientFactoryBeanTest/router"
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
username="username" password="passwd"
- loggingFeatureEnabled="true" loggingSizeLimit="200">
+ loggingFeatureEnabled="true" loggingSizeLimit="200" skipFaultLogging="true">
<cxf:schemaLocations>
<cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
</cxf:schemaLocations>