ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1535306 - in /webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token: BinarySecurity.java DerivedKeyToken.java Reference.java SecurityTokenReference.java
Date Thu, 24 Oct 2013 08:18:17 GMT
Author: coheigea
Date: Thu Oct 24 08:18:16 2013
New Revision: 1535306

URL: http://svn.apache.org/r1535306
Log:
[WSS-483] - wsse:Reference withhout ValueType

Modified:
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/DerivedKeyToken.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/Reference.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java?rev=1535306&r1=1535305&r2=1535306&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/BinarySecurity.java
Thu Oct 24 08:18:16 2013
@@ -168,7 +168,9 @@ public class BinarySecurity {
      * @param type 
      */
     public void setValueType(String type) {
-        element.setAttributeNS(null, "ValueType", type);
+        if (type != null) {
+            element.setAttributeNS(null, "ValueType", type);
+        }
     }
 
     /**
@@ -186,7 +188,9 @@ public class BinarySecurity {
      * @param encoding 
      */
     public void setEncodingType(String encoding) {
-        element.setAttributeNS(null, "EncodingType", encoding);
+        if (encoding != null) {
+            element.setAttributeNS(null, "EncodingType", encoding);
+        }
     }
 
     /**

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/DerivedKeyToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/DerivedKeyToken.java?rev=1535306&r1=1535305&r2=1535306&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/DerivedKeyToken.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/DerivedKeyToken.java
Thu Oct 24 08:18:16 2013
@@ -520,7 +520,9 @@ public class DerivedKeyToken {
      *             DerivedKeyToken
      */
     public void setAlgorithm(String algo) {
-        element.setAttributeNS(ns, "Algorithm", algo);
+        if (algo != null) {
+            element.setAttributeNS(ns, "Algorithm", algo);
+        }
     }
     
     /**

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/Reference.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/Reference.java?rev=1535306&r1=1535305&r2=1535306&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/Reference.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/Reference.java
Thu Oct 24 08:18:16 2013
@@ -115,7 +115,9 @@ public class Reference {
      * @param valueType the ValueType attribute to set
      */
     public void setValueType(String valueType) {
-        element.setAttributeNS(null, "ValueType", valueType);
+        if (valueType != null) {
+            element.setAttributeNS(null, "ValueType", valueType);
+        }
     }
 
     /**

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java?rev=1535306&r1=1535305&r2=1535306&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
Thu Oct 24 08:18:16 2013
@@ -139,12 +139,14 @@ public class SecurityTokenReference {
      * @param tokenType the wsse11:TokenType attribute to add
      */
     public void addTokenType(String tokenType) {
-        WSSecurityUtil.setNamespace(element, WSConstants.WSSE11_NS, WSConstants.WSSE11_PREFIX);
-        element.setAttributeNS(
-            WSConstants.WSSE11_NS, 
-            WSConstants.WSSE11_PREFIX + ":" + WSConstants.TOKEN_TYPE, 
-            tokenType
-        );
+        if (tokenType != null) {
+            WSSecurityUtil.setNamespace(element, WSConstants.WSSE11_NS, WSConstants.WSSE11_PREFIX);
+            element.setAttributeNS(
+                WSConstants.WSSE11_NS, 
+                WSConstants.WSSE11_PREFIX + ":" + WSConstants.TOKEN_TYPE, 
+                tokenType
+            );
+        }
     }
     
     /**



Mime
View raw message