axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] [Commented] (RAMPART-40) implementation of the Xpath support
Date Sun, 08 May 2011 19:48:03 GMT


Andreas Veithen commented on RAMPART-40:

There is something fundamentally wrong with this change (which is still in effect in the current
code base). The code actually builds a namespace context by scanning the entire document tree
for namespace declarations (see the findAllPrefixNamespaces method). None of the XML/WS-*
specs describe such a thing. There is also no such thing as a "predefined list of declared
namespaces". A namespace context is always built by starting from a given element and iterating
over its ancestors up to the root node.

This change is actually one of the causes of the bad performance reported by Dennis Sosnoski
[1]. In fact:

* Scanning the entire document causes expansion of nodes that would otherwise never be built.
* Scanning the entire document and collecting all namespace declarations is a costly operation.
* The code is executed several times during security processing.
* The code is executed even in scenarios without signatures or encryption.


> implementation of the Xpath support 
> ------------------------------------
>                 Key: RAMPART-40
>                 URL:
>             Project: Rampart
>          Issue Type: New Feature
>          Components: rampart-core, rampart-policy
>    Affects Versions: 1.1, 1.2
>         Environment: Apache Axis2 1.2,  Rampart-head , tomcat 5.5.23
>            Reporter: Angel Todorov
>             Fix For: 1.2
>         Attachments: policy_ut_xpath.xml, svn_diff.txt
> This is the implementation  (SVN Diff attached) of XPath support - <SignedElements>
, <EncryptedElements>. For now there are two ways to retrieve the namespace prefixes.
To use a predefined list of declared namespaces , as Ruchith is doing with the Optimized message
parts , or to recursively find all namespaces in the message (that is the default in the implementation).
> Ruchith,
> I think we can make some custom parameter in Rampart-config that will set the strategy
to use regarding namespace prefixes. 
> Thanks.
> Regards,
> Angel

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message