client stub are not given the namespace declaration for <sp:EncryptedElements>
------------------------------------------------------------------------------
Key: RAMPART-123
URL: https://issues.apache.org/jira/browse/RAMPART-123
Project: Rampart
Issue Type: Bug
Components: rampart-policy
Affects Versions: 1.3
Reporter: Kent Tong
I don't know if this is the same or related to RAMPART-64. For a simple policy
below (embedded in a WSDL file):
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ttdev.com/ss"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
name="SecureService" targetNamespace="http://ttdev.com/ss">
<wsp:Policy wsu:Id="p1">
<sp:AsymmetricBinding>
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:TripleDesRsa15 />
</wsp:Policy>
</sp:AlgorithmSuite>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:Wss10>
<wsp:Policy>
<sp:MustSupportRefEmbeddedToken />
<sp:MustSupportRefIssuerSerial />
</wsp:Policy>
</sp:Wss10>
<sp:SignedParts>
<sp:Body />
</sp:SignedParts>
<sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
<sp:EncryptedElements>
<sp:XPath>//foo</sp:XPath>
</sp:EncryptedElements>
</wsp:Policy>
...
</wsdl:definitions>
Everything works except for the <sp:EncryptedElements>. The client stub
generated is given a policy below. If you
check it carefully you'll find that the sp prefix is not defined for the
<EncryptedElements>. This behavior is as if
the EncryptedElements element was not recognized. When I run the client, it
throws a WstxParsingException
saying: Undeclared namespace prefix "sp".
.setPolicy(getPolicy(
"<wsp:Policy wsu:Id=\"p1\"
xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\"
xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsp:ExactlyOne><wsp:All><sp:AsymmetricBinding
xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><wsp:Policy><sp:InitiatorToken><wsp:Policy><sp:X509Token
sp:IncludeToken=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient\"><wsp:Policy><sp:WssX509V3Token10
/></wsp:Policy></sp:X509Token></wsp:Policy></sp:InitiatorToken><sp:RecipientToken><wsp:Policy><sp:X509Token
sp:IncludeToken=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never\"><wsp:Policy><sp:WssX509V3Token10
/></wsp:Policy></sp:X509Token></wsp:Policy></sp:RecipientToken><sp:AlgorithmSuite
xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><wsp:Policy><sp:TripleDesRsa15
/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Lax
/></wsp:Policy></sp:Layout></wsp:Policy></sp:AsymmetricBinding><sp:Wss10
xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Policy><sp:MustSupportRefIssuerSerial
/><sp:MustSupportRefEmbeddedToken /></sp:Policy></sp:Wss10><sp:SignedParts
xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Body
/></sp:SignedParts><sp:EncryptedParts
xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\"><sp:Body
/></sp:EncryptedParts><sp:EncryptedElements><sp:XPath>//foo</sp:XPath></sp:EncryptedElements></wsp:All></wsp:ExactlyOne></wsp:Policy>"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.