You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Nandana Mihindukulasooriya (JIRA)" <ji...@apache.org> on 2008/05/27 07:14:00 UTC

[jira] Updated: (RAMPART-132) Issue with XPath configuration inside RampartUtil

     [ https://issues.apache.org/jira/browse/RAMPART-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nandana Mihindukulasooriya updated RAMPART-132:
-----------------------------------------------

    Fix Version/s: 1.4

Set Fix version to 1.4. 

> Issue with XPath configuration inside RampartUtil
> -------------------------------------------------
>
>                 Key: RAMPART-132
>                 URL: https://issues.apache.org/jira/browse/RAMPART-132
>             Project: Rampart
>          Issue Type: Bug
>          Components: rampart-policy
>    Affects Versions: 1.1, 1.2, 1.3
>            Reporter: Narayan S Dhillon
>            Priority: Critical
>             Fix For: 1.4
>
>
> * Issue:
> RampartUtil intializes Jaxen XPath incorrectly. While adding the namespaces it's using the namespaces found in soap envelope as opposed to what is defined with  XPath expression in sp:XPath element.
> This makes XPath expression to fail if  targeted message  contains different namespace prefixs.
> Below is affected code snippet from org.apache.rampart.util.RampartUtil.getPartsAndElements(..)
> XPath xp = new AXIOMXPath(expression);
> Iterator nsIter = namespaces.iterator();
> while (nsIter.hasNext()){
> OMNamespace tmpNs = (OMNamespace)nsIter.next();
>       xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
> }
> Example:
> WS-SP policy sample:
> <wsp:Policy wsu:Id="InitiatePaymentRequestSignedPolicy">
> <sp:SignedElements> 
>             <sp:XPath xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">//S:Envelope/S:Body</sp:XPath>
>       </sp:SignedElements>
> </wsp:Policy>
> If soap envelope contains different namespace to "S" then Xpath wont work.
> * Possible Solution:
>  While registering the name spaces in above code snippet, it should also register the name spaces defined in sp:XPath element.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.