You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sanka Samaranayake (JIRA)" <ji...@apache.org> on 2007/06/18 11:01:32 UTC
[jira] Resolved: (AXIS2-2628) Neethi generates wrong policy objects
[ https://issues.apache.org/jira/browse/AXIS2-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanka Samaranayake resolved AXIS2-2628.
---------------------------------------
Resolution: Fixed
It looks fine to me when I ran a simple test against the latest codebase (Neethi & Rampart-Policy).
Thanks,
--Sanka
TEST:
public class JIRA_2628 {
public static void main(String[] args) throws Exception {
String policyString = "<wsp:Policy xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\"><sp:EncryptedElements xmlns:sp=\"http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512\"><sp:XPath>/sp:Envelope/sp:Body</sp:XPath></sp:EncryptedElements></wsp:Policy>";
ByteArrayInputStream bais = new ByteArrayInputStream(policyString
.getBytes());
Policy policy = PolicyEngine.getPolicy(bais);
XMLStreamWriter writer = XMLOutputFactory.newInstance()
.createXMLStreamWriter(System.out);
policy.serialize(writer);
writer.flush();
}
}
RESULT:
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<sp:EncryptedElements xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512">
<sp:XPath>/sp:Envelope/sp:Body</sp:XPath>
</sp:EncryptedElements>
</wsp:Policy>
> Neethi generates wrong policy objects
> -------------------------------------
>
> Key: AXIS2-2628
> URL: https://issues.apache.org/jira/browse/AXIS2-2628
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: modules
> Affects Versions: 1.2
> Environment: Windows XP, Tomcat 5.5.23, Apache Axis2 1.2 release
> Reporter: Angel Todorov
> Assignee: Sanka Samaranayake
> Priority: Blocker
>
> I am implementing the rampart support for the EncryptedElements assertion (encrypting/signing arbitrary elements of the soap message), and I have to have this assertion in my policy xml:
> <sp:EncryptedElements><sp:XPath>/sp:Envelope/sp:Body</sp:XPath></sp:EncryptedElements>
> This is completely correct by spec.
> But neethi interprets this in the wrong way, and generates this policy object (after serialization) :
> <sp:EncryptedElements sp:XPathVersion="/sp:Envelope/sp:Body" />
> Which is completely wrong. (In fact the xPathVersion is "optional" in the specification, but even then the above is wrong because it alters the semantics).
> This is a blocker because i cannot continue working on the rampart Encrypted/Signed Elements support before this is fixed. Big thank you :)
> Regards,
> Angel
--
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org