synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Created: (SYNAPSE-196) Inconsistent namespace resolution
Date Tue, 18 Dec 2007 00:26:43 GMT
Inconsistent namespace resolution

                 Key: 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"

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:
For additional commands, e-mail:

View raw message