[
https://issues.apache.org/jira/browse/SYNAPSE-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen updated SYNAPSE-196:
------------------------------------
Attachment: (was: namespace-patch.txt)
> 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 (<code>
> element) and headers (<header> 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:
> <header name="regsoap:capabilities"
> value="urn:freebxml:registry:soap:modernFaultCodes"/>
> Currently this only works if the namespace is declared on the <header>
> element:
> <header name="regsoap:capabilities"
> value="urn:freebxml:registry:soap:modernFaultCodes"
> xmlns:regsoap="urn:freebxml:registry:soap"/>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]