You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2019/05/27 17:27:52 UTC

[camel] branch master updated: [CAMEL-13376]camel-cxf - failure processor for custom exception handling cannot get the original message

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 5b0e473  [CAMEL-13376]camel-cxf - failure processor for custom exception handling cannot get the original message
5b0e473 is described below

commit 5b0e473cfd1afca0d2d700c88e75f9bcd3d3a621
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon May 27 13:27:39 2019 -0400

    [CAMEL-13376]camel-cxf - failure processor for custom exception handling cannot get the original message
---
 .../src/main/java/org/apache/camel/component/cxf/CxfPayload.java  | 8 ++++++++
 .../apache/camel/component/cxf/converter/CachedCxfPayload.java    | 1 +
 2 files changed, 9 insertions(+)

diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
index d241a26..8931de1 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
@@ -134,6 +134,14 @@ public class CxfPayload<T> {
         return body;
     }
     
+    /*
+     * set the body back with cached stream source so
+     * CxfPayload is re-readable
+     */
+    public void setBodySources(List<Source> body) {
+        this.body = body;
+    }
+    
     public List<T> getHeaders() {
         return headers;
     }
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
index 7764cd7..27cec31 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
@@ -100,6 +100,7 @@ public class CachedCxfPayload<T> extends CxfPayload<T> implements StreamCache {
                 li.set(document);
             }
         }
+        orig.setBodySources(getBodySources());
     }
 
     private CachedCxfPayload(CachedCxfPayload<T> orig, Exchange exchange) throws IOException {