Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F37681D3 for ; Thu, 18 Aug 2011 03:38:00 +0000 (UTC) Received: (qmail 17611 invoked by uid 500); 18 Aug 2011 03:38:00 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 15890 invoked by uid 500); 18 Aug 2011 03:37:52 -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 15867 invoked by uid 99); 18 Aug 2011 03:37:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 03:37:48 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,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; Thu, 18 Aug 2011 03:37:47 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 40BA2C1046 for ; Thu, 18 Aug 2011 03:37:27 +0000 (UTC) Date: Thu, 18 Aug 2011 03:37:27 +0000 (UTC) From: "Jesse Pangburn (JIRA)" To: issues@cxf.apache.org Message-ID: <2093844746.47739.1313638647261.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <779872180.47273.1313625747160.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CXF-3748) Using Dispatch API with SOAPMessage type fails to set WS-Addressing action header properly if there's whitespace after the soap:body MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Pangburn updated CXF-3748: -------------------------------- Attachment: patch3747and3748.txt patch3748.txt Two patches are attached. patch3748.txt fixes just this bug. patch3747and3748.txt fixes this bug and 3747 together since they're both in the same file and I am editing on the same revision. > Using Dispatch API with SOAPMessage type fails to set WS-Addressing action header properly if there's whitespace after the soap:body > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: CXF-3748 > URL: https://issues.apache.org/jira/browse/CXF-3748 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.4.1 > Reporter: Jesse Pangburn > Priority: Minor > Labels: dispatch, soapmessage, ws-addressing > Attachments: patch3747and3748.txt, patch3748.txt > > Original Estimate: 2h > Remaining Estimate: 2h > > if you use a SOAPMessage instead of a Source then the following function fails (ignoring the exception) and your ws-addressing action doesn't get set- if you have any whitespace after the soap:body element before your first payload element: > private String getPayloadElementName(SOAPMessage soapMessage) { > try { > SOAPElement element = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next(); > return new QName(element.getNamespaceURI(), element.getLocalName()).toString(); > } catch (Exception e) { > //ignore > } > return null; > > } > This fails because the .next() call at the end gets a text node instead of an element object so the cast fails. So inexplicably your ws-addressing action header doesn't get set as far as the user sees. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira