cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1458929 - in /cxf/branches/2.7.x-fixes: rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/tr...
Date Wed, 20 Mar 2013 16:32:30 GMT
Author: coheigea
Date: Wed Mar 20 16:32:29 2013
New Revision: 1458929

URL: http://svn.apache.org/r1458929
Log:
Merged revisions 1458926 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1458926 | coheigea | 2013-03-20 16:27:24 +0000 (Wed, 20 Mar 2013) | 2 lines

  Removing some non-namespace aware DOM calls

........

Modified:
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
    cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java
    cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
    cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
    cxf/branches/2.7.x-fixes/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java
    cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
    cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
    cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsParser.java
    cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
    cxf/branches/2.7.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
    cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
Wed Mar 20 16:32:29 2013
@@ -70,11 +70,11 @@ public class EncryptedPartsBuilder imple
     private void processElement(Element element, SignedEncryptedParts parent) {
 
         if ("Header".equals(element.getLocalName())) {
-            String nameAttribute = element.getAttribute(SPConstants.NAME);
+            String nameAttribute = element.getAttributeNS(null, SPConstants.NAME);
             if (nameAttribute == null) {
                 nameAttribute = "";
             }
-            String namespaceAttribute = element.getAttribute(SPConstants.NAMESPACE);
+            String namespaceAttribute = element.getAttributeNS(null, SPConstants.NAMESPACE);
             if ("".equals(namespaceAttribute)) {
                 throw new IllegalArgumentException(
                     "sp:EncryptedParts/sp:Header@Namespace must have a value"

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/RequiredPartsBuilder.java
Wed Mar 20 16:32:29 2013
@@ -55,12 +55,12 @@ public class RequiredPartsBuilder implem
     private void processElement(Element element, RequiredParts parent) {
         if ("Header".equals(element.getLocalName())) {
 
-            String nameAttribute = element.getAttribute(SPConstants.NAME);
+            String nameAttribute = element.getAttributeNS(null, SPConstants.NAME);
             if (nameAttribute == null) {
                 nameAttribute = "";
             }
 
-            String namespaceAttribute = element.getAttribute(SPConstants.NAMESPACE);
+            String namespaceAttribute = element.getAttributeNS(null, SPConstants.NAMESPACE);
             if ("".equals(namespaceAttribute)) {
                 throw new IllegalArgumentException(
                     "sp:RequiredParts/sp:Header@Namespace must have a value"

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java
Wed Mar 20 16:32:29 2013
@@ -72,11 +72,11 @@ public class SignedPartsBuilder implemen
 
         if ("Header".equals(element.getLocalName())) {
 
-            String nameAttribute = element.getAttribute(SPConstants.NAME);
+            String nameAttribute = element.getAttributeNS(null, SPConstants.NAME);
             if (nameAttribute == null) {
                 nameAttribute = "";
             }
-            String namespaceAttribute = element.getAttribute(SPConstants.NAMESPACE);
+            String namespaceAttribute = element.getAttributeNS(null, SPConstants.NAMESPACE);
             if ("".equals(namespaceAttribute)) {
                 throw new IllegalArgumentException(
                     "sp:SignedParts/sp:Header@Namespace must have a value"

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Wed Mar 20 16:32:29 2013
@@ -439,7 +439,7 @@ public class SecurityToken implements Se
             return DOMUtils.getContent(child);
         } else if (Reference.TOKEN.getLocalPart().equals(child.getLocalName())
             && Reference.TOKEN.getNamespaceURI().equals(child.getNamespaceURI()))
{
-            return child.getAttribute("URI").substring(1);
+            return child.getAttributeNS(null, "URI").substring(1);
         }
         return null;
     }

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
Wed Mar 20 16:32:29 2013
@@ -1475,7 +1475,7 @@ public abstract class AbstractSTSClient 
             || elName.equals(new QName(WSConstants.WSSE_NS, "KeyIdentifier"))) {
             return DOMUtils.getContent(child);
         } else if (elName.equals(Reference.TOKEN)) {
-            return child.getAttribute("URI");
+            return child.getAttributeNS(null, "URI");
         } else if (elName.equals(new QName(STSUtils.SCT_NS_05_02, "Identifier"))
                    || elName.equals(new QName(STSUtils.SCT_NS_05_12, "Identifier"))) {
             return DOMUtils.getContent(child);

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Wed Mar 20 16:32:29 2013
@@ -1051,7 +1051,7 @@ public abstract class AbstractBindingBui
         String id;
         
         //first try to get the Id attr
-        Attr idAttr = elem.getAttributeNode("Id");
+        Attr idAttr = elem.getAttributeNodeNS(null, "Id");
         if (idAttr == null) {
             //then try the wsu:Id value
             idAttr = elem.getAttributeNodeNS(PolicyConstants.WSU_NAMESPACE_URI, "Id");
@@ -1398,7 +1398,7 @@ public abstract class AbstractBindingBui
                         } else {
                             //not forcing an ID on this.  Use one if there is one 
                             //there already, but don't force one
-                            Attr idAttr = el.getAttributeNode("Id");
+                            Attr idAttr = el.getAttributeNodeNS(null, "Id");
                             if (idAttr == null) {
                                 //then try the wsu:Id value
                                 idAttr = el.getAttributeNodeNS(PolicyConstants.WSU_NAMESPACE_URI,
"Id");

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
Wed Mar 20 16:32:29 2013
@@ -469,7 +469,7 @@ public abstract class AbstractBindingPol
                     for (WSDataRef r : el) {
                         Element protectedElement = r.getProtectedElement();
                         if (protectedElement != null) {
-                            String id = protectedElement.getAttribute("Id");
+                            String id = protectedElement.getAttributeNS(null, "Id");
                             String wsuId = protectedElement.getAttributeNS(WSConstants.WSU_NS,
"Id");
                             if (sigId.equals(id) || sigId.equals(wsuId)) {
                                 return true;

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractPolicySecurityTest.java
Wed Mar 20 16:32:29 2013
@@ -336,7 +336,7 @@ public abstract class AbstractPolicySecu
         Element issuedAssertion = 
             this.readDocument("example-sts-issued-saml-assertion.xml").getDocumentElement();
         
-        String assertionId = issuedAssertion.getAttributeNode("AssertionID").getNodeValue();
+        String assertionId = issuedAssertion.getAttributeNodeNS(null, "AssertionID").getNodeValue();
         
         SecurityToken issuedToken = 
             new SecurityToken(assertionId, issuedAssertion, null);

Modified: cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java
Wed Mar 20 16:32:29 2013
@@ -45,8 +45,8 @@ public class IdentityClaimsParser implem
         String claimLocalName = claimType.getLocalName();
         String claimNS = claimType.getNamespaceURI();
         if ("ClaimType".equals(claimLocalName)) {
-            String claimTypeUri = claimType.getAttribute("Uri");
-            String claimTypeOptional = claimType.getAttribute("Optional");
+            String claimTypeUri = claimType.getAttributeNS(null, "Uri");
+            String claimTypeOptional = claimType.getAttributeNS(null, "Optional");
             RequestClaim requestClaim = new RequestClaim();
             try {
                 requestClaim.setClaimType(new URI(claimTypeUri));
@@ -60,8 +60,8 @@ public class IdentityClaimsParser implem
             requestClaim.setOptional(Boolean.parseBoolean(claimTypeOptional));
             return requestClaim;
         } else if ("ClaimValue".equals(claimLocalName)) {
-            String claimTypeUri = claimType.getAttribute("Uri");
-            String claimTypeOptional = claimType.getAttribute("Optional");
+            String claimTypeUri = claimType.getAttributeNS(null, "Uri");
+            String claimTypeOptional = claimType.getAttributeNS(null, "Optional");
             RequestClaim requestClaim = new RequestClaim();
             try {
                 requestClaim.setClaimType(new URI(claimTypeUri));

Modified: cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
Wed Mar 20 16:32:29 2013
@@ -570,7 +570,7 @@ public class RequestParser {
         String dialectAttr = null;
         RequestClaimCollection requestedClaims = new RequestClaimCollection();
         try {
-            dialectAttr = claimsElement.getAttribute("Dialect");
+            dialectAttr = claimsElement.getAttributeNS(null, "Dialect");
             if (dialectAttr != null && !"".equals(dialectAttr)) {
                 requestedClaims.setDialect(new URI(dialectAttr));
             }

Modified: cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
Wed Mar 20 16:32:29 2013
@@ -175,9 +175,9 @@ public class SAMLTokenProvider implement
             String tokenType = tokenRequirements.getTokenType();
             if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) 
                 || WSConstants.SAML2_NS.equals(tokenType)) {
-                response.setTokenId(token.getAttribute("ID"));
+                response.setTokenId(token.getAttributeNS(null, "ID"));
             } else {
-                response.setTokenId(token.getAttribute("AssertionID"));
+                response.setTokenId(token.getAttributeNS(null, "AssertionID"));
             }
             
             DateTime validFrom = null;

Modified: cxf/branches/2.7.x-fixes/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java
Wed Mar 20 16:32:29 2013
@@ -34,12 +34,12 @@ public class CustomClaimParser implement
         String claimLocalName = claim.getLocalName();
         String claimNS = claim.getNamespaceURI();
         if (CLAIMS_DIALECT.equals(claimNS) && "MyElement".equals(claimLocalName))
{
-            String claimTypeUri = claim.getAttribute("Uri");
+            String claimTypeUri = claim.getAttributeNS(null, "Uri");
             CustomRequestClaim response = new CustomRequestClaim();
             response.setClaimType(URI.create(claimTypeUri));
-            String claimValue = claim.getAttribute("value");
+            String claimValue = claim.getAttributeNS(null, "value");
             response.setClaimValue(claimValue);
-            String scope = claim.getAttribute("scope");
+            String scope = claim.getAttributeNS(null, "scope");
             response.setScope(scope);
             return response;
         }

Modified: cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
Wed Mar 20 16:32:29 2013
@@ -1086,7 +1086,7 @@ public class SimpleBatchSTSClient implem
             || elName.equals(new QName(WSConstants.WSSE_NS, "KeyIdentifier"))) {
             return DOMUtils.getContent(child);
         } else if (elName.equals(Reference.TOKEN)) {
-            return child.getAttribute("URI");
+            return child.getAttributeNS(null, "URI");
         } else if (elName.equals(new QName(STSUtils.SCT_NS_05_02, "Identifier"))
                    || elName.equals(new QName(STSUtils.SCT_NS_05_12, "Identifier"))) {
             return DOMUtils.getContent(child);

Modified: cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
Wed Mar 20 16:32:29 2013
@@ -58,12 +58,12 @@ public final class TokenTestUtils {
         //mess with the token a bit to force it to fail to validate
         Element e = tok.getToken();
         Element e2 = DOMUtils.getFirstChildWithName(e, e.getNamespaceURI(), "Conditions");
-        String nb = e2.getAttribute("NotBefore");
-        String noa = e2.getAttribute("NotOnOrAfter");
+        String nb = e2.getAttributeNS(null, "NotBefore");
+        String noa = e2.getAttributeNS(null, "NotOnOrAfter");
         nb = "2010" + nb.substring(4);
         noa = "2010" + noa.substring(4);
-        e2.setAttribute("NotBefore", nb);
-        e2.setAttribute("NotOnOrAfter", noa);
+        e2.setAttributeNS(null, "NotBefore", nb);
+        e2.setAttributeNS(null, "NotOnOrAfter", noa);
         try {
             sts.validateSecurityToken(tok);
             fail("Failure expected on an invalid token");

Modified: cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsParser.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsParser.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomClaimsParser.java
Wed Mar 20 16:32:29 2013
@@ -50,8 +50,8 @@ public class CustomClaimsParser implemen
         String claimLocalName = claimType.getLocalName();
         String claimNS = claimType.getNamespaceURI();
         if ("ClaimType".equals(claimLocalName)) {
-            String claimTypeUri = claimType.getAttribute("Uri");
-            String claimTypeOptional = claimType.getAttribute("Optional");
+            String claimTypeUri = claimType.getAttributeNS(null, "Uri");
+            String claimTypeOptional = claimType.getAttributeNS(null, "Optional");
             RequestClaim requestClaim = new RequestClaim();
             try {
                 requestClaim.setClaimType(new URI(claimTypeUri));
@@ -65,8 +65,8 @@ public class CustomClaimsParser implemen
             requestClaim.setOptional(Boolean.parseBoolean(claimTypeOptional));
             return requestClaim;
         } else if ("ClaimValue".equals(claimLocalName)) {
-            String claimTypeUri = claimType.getAttribute("Uri");
-            String claimTypeOptional = claimType.getAttribute("Optional");
+            String claimTypeUri = claimType.getAttributeNS(null, "Uri");
+            String claimTypeOptional = claimType.getAttributeNS(null, "Optional");
             RequestClaim requestClaim = new RequestClaim();
             try {
                 requestClaim.setClaimType(new URI(claimTypeUri));

Modified: cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
Wed Mar 20 16:32:29 2013
@@ -109,9 +109,9 @@ public class SCTSAMLTokenProvider implem
             String tokenType = tokenRequirements.getTokenType();
             if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) 
                     || WSConstants.SAML2_NS.equals(tokenType)) {
-                response.setTokenId(token.getAttribute("ID"));
+                response.setTokenId(token.getAttributeNS(null, "ID"));
             } else {
-                response.setTokenId(token.getAttribute("AssertionID"));
+                response.setTokenId(token.getAttributeNS(null, "AssertionID"));
             }
             response.setLifetime(conditionsProvider.getLifetime());
             response.setEntropy(entropyBytes);

Modified: cxf/branches/2.7.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
(original)
+++ cxf/branches/2.7.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/TokenTestUtils.java
Wed Mar 20 16:32:29 2013
@@ -59,12 +59,12 @@ public final class TokenTestUtils {
         //mess with the token a bit to force it to fail to validate
         Element e = tok.getToken();
         Element e2 = DOMUtils.getFirstChildWithName(e, e.getNamespaceURI(), "Conditions");
-        String nb = e2.getAttribute("NotBefore");
-        String noa = e2.getAttribute("NotOnOrAfter");
+        String nb = e2.getAttributeNS(null, "NotBefore");
+        String noa = e2.getAttributeNS(null, "NotOnOrAfter");
         nb = "2010" + nb.substring(4);
         noa = "2010" + noa.substring(4);
-        e2.setAttribute("NotBefore", nb);
-        e2.setAttribute("NotOnOrAfter", noa);
+        e2.setAttributeNS(null, "NotBefore", nb);
+        e2.setAttributeNS(null, "NotOnOrAfter", noa);
         try {
             sts.validateSecurityToken(tok);
             fail("Failure expected on an invalid token");

Modified: cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java?rev=1458929&r1=1458928&r2=1458929&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java
Wed Mar 20 16:32:29 2013
@@ -496,7 +496,7 @@ public class JavaFirstPolicyServiceTest 
     private Element getOperationElement(String operationName, List<Element> operationMessages)
{
         Element operationElement = null;
         for (Element operation : operationMessages) {
-            if (operationName.equals(operation.getAttribute("name"))) {
+            if (operationName.equals(operation.getAttributeNS(null, "name"))) {
                 operationElement = operation;
                 break;
             }
@@ -512,7 +512,7 @@ public class JavaFirstPolicyServiceTest 
         Element policyReference = DOMUtils.getFirstChildWithName(messageElement, policyNamespace,
                                                                  "PolicyReference");
         if (policyReference != null) {
-            return policyReference.getAttribute("URI");
+            return policyReference.getAttributeNS(null, "URI");
         } else {
             return null;
         }
@@ -522,7 +522,7 @@ public class JavaFirstPolicyServiceTest 
         Element policyReference = DOMUtils.getFirstChildWithName(operationElement, policyNamespace,
                                                                  "PolicyReference");
         if (policyReference != null) {
-            return policyReference.getAttribute("URI");
+            return policyReference.getAttributeNS(null, "URI");
         } else {
             return null;
         }



Mime
View raw message