Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8AD4175D9 for ; Fri, 17 Jul 2015 07:23:04 +0000 (UTC) Received: (qmail 4813 invoked by uid 500); 17 Jul 2015 07:23:04 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 4770 invoked by uid 500); 17 Jul 2015 07:23:04 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 4759 invoked by uid 99); 17 Jul 2015 07:23:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 07:23:04 +0000 Date: Fri, 17 Jul 2015 07:23:04 +0000 (UTC) From: "Franz Forsthofer (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-8978) Setting of SOAP headers via the Camel Header "org.apache.cxf.headers.Header.list" not working for CXF data format "PAYLOAD" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Franz Forsthofer created CAMEL-8978: --------------------------------------- Summary: Setting of SOAP headers via the Camel Header "org.apache.cxf.headers.Header.list" not working for CXF data format "PAYLOAD" Key: CAMEL-8978 URL: https://issues.apache.org/jira/browse/CAMEL-8978 Project: Camel Issue Type: Bug Components: camel-cxf Affects Versions: 2.15.2, 2.14.3 Reporter: Franz Forsthofer Fix For: 2.15.3, 2.14.4, 2.16 In the camel-cxf documentation https://camel.apache.org/cxf.html is described in the chapter "How to deal with the message for a camel-cxf endpoint in PAYLOAD data format" that "You can use the Header.HEADER_LIST as the key to set or get the SOAP headers". But this only works for getting SOAP headers. If you want to set SOAP headers via the Camel header Header.HEADER_LIST, the headers are not taken into account in the CXF-to-endpoint. I analysed the problem and found out that - the SOAP header list is forwarded to the CXF request context - that this header list is overwritten in CxfEndpoint.CamelCxfClientImpl by the CxfPayload.getHeaders() value. My suggestion is that we merge the headers from the Camel header and the the CXF payload in CxfEndpoint.CamelCxfClientImpl. See the attached patch. With the merging we cover all different use cases: - the headers can be set in the CxfPayload - the headers can be set in the Camel header Header.list - the headers can be set in the CXFPayload and the CamelHeader Header.list. Also the case where the list instance in the CxfPayload is the same as in the Camel header (in this case no merge is necessary) is covered. This case happens if the from-endpoint is also a CXF endpoint and the CXF payload is forwarded to the to-CXF-endpoint. I can commit the change. However, before I do it I want to have the agreement from the CXF experts. -- This message was sent by Atlassian JIRA (v6.3.4#6332)