From synapse-dev-return-5374-apmail-ws-synapse-dev-archive=ws.apache.org@ws.apache.org Wed Dec 19 09:49:04 2007 Return-Path: Delivered-To: apmail-ws-synapse-dev-archive@www.apache.org Received: (qmail 90689 invoked from network); 19 Dec 2007 09:49:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2007 09:49:04 -0000 Received: (qmail 90911 invoked by uid 500); 19 Dec 2007 09:48:53 -0000 Delivered-To: apmail-ws-synapse-dev-archive@ws.apache.org Received: (qmail 90743 invoked by uid 500); 19 Dec 2007 09:48:53 -0000 Mailing-List: contact synapse-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: synapse-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list synapse-dev@ws.apache.org Received: (qmail 90726 invoked by uid 99); 19 Dec 2007 09:48:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 01:48:53 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 09:48:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 36724714277 for ; Wed, 19 Dec 2007 01:48:43 -0800 (PST) Message-ID: <15663411.1198057723212.JavaMail.jira@brutus> Date: Wed, 19 Dec 2007 01:48:43 -0800 (PST) From: "Andreas Veithen (JIRA)" To: synapse-dev@ws.apache.org Subject: [jira] Updated: (SYNAPSE-196) Inconsistent namespace resolution In-Reply-To: <15032817.1197937603408.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SYNAPSE-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Veithen updated SYNAPSE-196: ------------------------------------ Attachment: namespace-patch.txt There is also another issue related to this: FaultMediatorFactory doesn't check the result of OMElementUtils#getNameSpaceWithPrefix. This might lead to unexpected results. Attached a new version of the patch that also resolves this. > Inconsistent namespace resolution > --------------------------------- > > Key: SYNAPSE-196 > URL: https://issues.apache.org/jira/browse/SYNAPSE-196 > Project: Synapse > Issue Type: Bug > Components: Core > Affects Versions: NIGHTLY > Reporter: Andreas Veithen > Priority: Minor > Attachments: namespace-patch.txt > > > In synapse.xml, resolution of namespace prefixes for SOAP fault codes ( element) and headers (
element) only works if the namespace is declared on the element itself, but not if it is declared on an ancestor of the element. For example, the following declaration will result in an error if the regsoap prefix is defined on the root element: >
> Currently this only works if the namespace is declared on the
element: >
> This behavior is a rather unusual for XML documents and is also inconsistent with the behavior for XPath expressions appearing in synapse.xml (where resolution of namespace prefixes works as expected). > To solve this issue, the following changes would be required: > * Modify OMElementUtils.getNameSpaceWithPrefix (which is used exclusively by FaultMediatorFactory) to recursively scan elements for namespace declarations, starting from the element passed as argument up to the root element and stopping on the first matching namespace prefix. > * Modify HeaderMediatorFactory to use OMElementUtils.getNameSpaceWithPrefix as well (for the moment it uses a piece of code that is similar to the current implementation of OMElementUtils.getNameSpaceWithPrefix). > A proposed patch is attached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org For additional commands, e-mail: synapse-dev-help@ws.apache.org