Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 73077 invoked from network); 4 Mar 2011 12:51:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Mar 2011 12:51:01 -0000 Received: (qmail 73717 invoked by uid 500); 4 Mar 2011 12:51:00 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 73692 invoked by uid 500); 4 Mar 2011 12:51:00 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 73649 invoked by uid 99); 4 Mar 2011 12:51:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 12:51:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 12:50:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E92884F3BA for ; Fri, 4 Mar 2011 12:50:36 +0000 (UTC) Date: Fri, 4 Mar 2011 12:50:36 +0000 (UTC) From: "Aki Yoshida (JIRA)" To: issues@cxf.apache.org Message-ID: <175330083.13751.1299243036951.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <621544904.771.1298668161747.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Issue Comment Edited: (CXF-3367) SOAPAction value not extracted in the inbound processing if the header name does not match exactly "SOAPAction" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002570#comment-13002570 ] Aki Yoshida edited comment on CXF-3367 at 3/4/11 12:50 PM: ----------------------------------------------------------- Hi Daniel, I also tested the trunk 2.4.0-SNAPSHOT. I'm attaching test_patches.tar.gz containing the test classes for 2.3.x and trunk branches/2.3.x-fixes - AbstractHTTPDestinationTest.java trunk - HeadersTest.java regards, aki was (Author: ay): unit test classes for 2.3.x and trunk.in tar.gz 2.3.x - AbstractHTTPDestinationTest trunk - HeadersTest > SOAPAction value not extracted in the inbound processing if the header name does not match exactly "SOAPAction" > --------------------------------------------------------------------------------------------------------------- > > Key: CXF-3367 > URL: https://issues.apache.org/jira/browse/CXF-3367 > Project: CXF > Issue Type: Bug > Components: Soap Binding > Affects Versions: 2.3.2 > Reporter: Aki Yoshida > Assignee: Daniel Kulp > Fix For: 2.4, 2.3.4 > > Attachments: ProtocolHeaders.tar.gz, diff_rt.transports.txt.gz, test_patches.tar.gz > > Original Estimate: 4h > Remaining Estimate: 4h > > The inbound processing uses org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor to extract the SOAPAction header from the protocol header and put it in the message's property.The extraction code looks for the exact string "SOAPAction" in the protocol header instead of looking for the soap action header in the case-insenstive way. > The inbound processing initially converts the names of the transport headers from the web container using HttpHeaderHelper. Later, the converted names are stored in a plain map which is passed as the PROTOCOL_HEADERS property. So, if the soap action header is provided as "SOAPAction" or "soapaction" from the web container, this header is stored with key "SOAPAction" and it can be retrieved later. However, if the name is provided using different mixed casing, it is stored with that name and it can only be retrieved using this exact key. > Initially, I thought we could change SOAPActionInInterceptor locally to look for the soapaction header. But this will not solve other potential problems with the current map. > So, instead of just changing the SOAPActionInInterceptor, I am in favor of changing the implementation of the PROTOCOL_HEADERS map to support the case-insensitive lookup while preserving the original keys in the map. > Another reason favoring this approach is that the current case-sensitive map can have a few other problems. For example, the map currently contains two Content-Type headers after it is created by AbstractHTTPDestination (over Jetty): one with "content-type" and the other with "Content-Type". And this is confusing and may lead to some conflicts. Another problem is the extraction problem for other headers when they are spelled in different mixed casing when they are passed. > So, I think we should use a specific map class that matches the current interface but supports the case-insensitive lookup while preserving the original case sensitive keys. The attached ProtocolHeaders class satisfies this requirement. Its unit test class ProtocolHeadersTest is also attached. > This class can be used in AbstractHTTPDestination to create the correct protocol headers map. I added a test case AbstractHTTPDestinationTest to check the extraction of the headers into the protocol headers map. The svn diff of 2.3.2 are attached. > Please take a look at the files and let me know how you think. > Thanks. > Regards, aki -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira