This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch camel-3.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push: new 6e84e21353c [CAMEL-19455]Ensure REQUEST_CONTEXT & RESPONSE_CONTEXT headers are Map when populating CXF Message from Camel Message 6e84e21353c is described below commit 6e84e21353c8899f0173d38672496f10b3dda7c7 Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Wed Jun 14 12:00:12 2023 -0400 [CAMEL-19455]Ensure REQUEST_CONTEXT & RESPONSE_CONTEXT headers are Map when populating CXF Message from Camel Message (cherry picked from commit 668ae0aa36551d16fdfce004fbbe41a6a5851a2c) (cherry picked from commit 0dd99b4abfdfe08cf565d16e5d9aa4d706868b2e) --- .../apache/camel/component/cxf/jaxws/DefaultCxfBinding.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/DefaultCxfBinding.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/DefaultCxfBinding.java index 41f3a506a7c..fce4b4b26a3 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/DefaultCxfBinding.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/DefaultCxfBinding.java @@ -595,7 +595,11 @@ public class DefaultCxfBinding implements CxfBinding, HeaderFilterStrategyAware String contextKey) { // extract from header - Map<String, ?> context = (Map<String, ?>) camelHeaders.get(contextKey); + Map<String, ?> context = null; + if (camelHeaders.get(contextKey) instanceof Map) { + context = (Map<String, ?>) camelHeaders.get(contextKey); + } + if (context != null) { cxfContext.putAll(context); if (LOG.isTraceEnabled()) { @@ -607,7 +611,10 @@ public class DefaultCxfBinding implements CxfBinding, HeaderFilterStrategyAware } // extract from exchange property - context = (Map<String, ?>) camelExchange.getProperty(contextKey); + if (camelExchange.getProperty(contextKey) instanceof Map) { + context = (Map<String, ?>) camelExchange.getProperty(contextKey); + } + if (context != null) { cxfContext.putAll(context); if (LOG.isTraceEnabled()) {