Author: veithen
Date: Wed Nov 14 12:16:05 2012
New Revision: 1409175

URL: http://svn.apache.org/viewvc?rev=1409175&view=rev
Log:
Eliminated usage of deprecated Axiom class.

Modified:
    
axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/java/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
    
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java
    
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
    
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenIssuerUtil.java

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/java/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/java/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java?rev=1409175&r1=1409174&r2=1409175&view=diff
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/java/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/java/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
 Wed Nov 14 12:16:05 2012
@@ -21,7 +21,7 @@ import javax.xml.namespace.QName;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.neethi.Policy;
 import org.apache.rampart.handler.config.InflowConfiguration;
 import org.apache.rampart.handler.config.OutflowConfiguration;
@@ -57,7 +57,7 @@ public class RahasSAMLTokenUTForHoKV1205
             byte[] nonce = WSSecurityUtil.generateNonce(16);
             clientEntr = nonce;
             OMElement entrElem = 
TrustUtil.createEntropyElement(RahasConstants.VERSION_05_12, rstElem);
-            TrustUtil.createBinarySecretElement(RahasConstants.VERSION_05_12, 
entrElem, RahasConstants.BIN_SEC_TYPE_NONCE).setText(Base64.encode(nonce));
+            TrustUtil.createBinarySecretElement(RahasConstants.VERSION_05_12, 
entrElem, RahasConstants.BIN_SEC_TYPE_NONCE).setText(Base64Utils.encode(nonce));
             
TrustUtil.createComputedKeyAlgorithm(RahasConstants.VERSION_05_12,rstElem, 
RahasConstants.COMPUTED_KEY_PSHA1);
             
             return rstElem;

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java?rev=1409175&r1=1409174&r2=1409175&view=diff
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java
 Wed Nov 14 12:16:05 2012
@@ -19,7 +19,7 @@ package org.apache.rahas;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMXMLBuilderFactory;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.ws.security.WSConstants;
@@ -395,7 +395,7 @@ public class RahasData {
             OMElement binSecElem = entropyElem.getFirstElement();
             if (binSecElem != null && binSecElem.getText() != null
                 && !"".equals(binSecElem.getText())) {
-                this.requestEntropy = Base64.decode(binSecElem.getText());
+                this.requestEntropy = Base64Utils.decode(binSecElem.getText());
             } else {
                 throw new TrustException("malformedEntropyElement",
                                          new String[]{entropyElem.toString()});

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java?rev=1409175&r1=1409174&r2=1409175&view=diff
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
 Wed Nov 14 12:16:05 2012
@@ -21,8 +21,8 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.Base64;
 import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -474,7 +474,7 @@ public class STSClient {
                                                           BINARY_SECRET))) {
                 //First check for the binary secret
                 String b64Secret = child.getText();
-                secret = Base64.decode(b64Secret);
+                secret = Base64Utils.decode(b64Secret);
             } else if (child.getQName().equals(new QName(ns, 
WSConstants.ENC_KEY_LN))) {
 
                 Element domChild = (Element) new StAXOMBuilder(
@@ -505,7 +505,7 @@ public class STSClient {
                 if (binSecElem != null && binSecElem.getText() != null
                     && !"".equals(binSecElem.getText().trim())) {
 
-                    byte[] serviceEntr = Base64.decode(binSecElem.getText());
+                    byte[] serviceEntr = 
Base64Utils.decode(binSecElem.getText());
 
                     //Right now we only use PSHA1 as the computed key algo     
               
                     P_SHA1 p_sha1 = new P_SHA1();
@@ -718,10 +718,10 @@ public class STSClient {
                     this.requestorEntropy =
                             WSSecurityUtil.generateNonce(this.algorithmSuite.
                                     getMaximumSymmetricKeyLength()/8);
-                    binSec.setText(Base64.encode(this.requestorEntropy));
+                    binSec.setText(Base64Utils.encode(this.requestorEntropy));
 
                     if (log.isDebugEnabled()) {
-                        log.debug("Clien entropy : " + 
Base64.encode(this.requestorEntropy));
+                        log.debug("Clien entropy : " + 
Base64Utils.encode(this.requestorEntropy));
                     }
 
                     // Add the ComputedKey element
@@ -744,10 +744,10 @@ public class STSClient {
                     this.requestorEntropy =
                             WSSecurityUtil.generateNonce(this.algorithmSuite.
                                     getMaximumSymmetricKeyLength()/8);
-                    binSec.setText(Base64.encode(this.requestorEntropy));
+                    binSec.setText(Base64Utils.encode(this.requestorEntropy));
 
                     if (log.isDebugEnabled()) {
-                        log.debug("Clien entropy : " + 
Base64.encode(this.requestorEntropy));
+                        log.debug("Clien entropy : " + 
Base64Utils.encode(this.requestorEntropy));
                     }
 
                     // Add the ComputedKey element

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenIssuerUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenIssuerUtil.java?rev=1409175&r1=1409174&r2=1409175&view=diff
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenIssuerUtil.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenIssuerUtil.java
 Wed Nov 14 12:16:05 2012
@@ -18,7 +18,7 @@ package org.apache.rahas.impl;
 import java.security.SecureRandom;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.rahas.RahasConstants;
 import org.apache.rahas.RahasData;
 import org.apache.rahas.Token;
@@ -94,7 +94,7 @@ public class TokenIssuerUtil {
             //set the RPT to include a ComputedKey element
 
             OMElement respEntrElem = 
TrustUtil.createEntropyElement(wstVersion, rstrElem);
-            String entr = Base64.encode(data.getResponseEntropy());
+            String entr = Base64Utils.encode(data.getResponseEntropy());
             OMElement binSecElem = 
TrustUtil.createBinarySecretElement(wstVersion,
                                                             respEntrElem,
                                                             
RahasConstants.BIN_SEC_TYPE_NONCE);
@@ -141,7 +141,7 @@ public class TokenIssuerUtil {
                 OMElement binSecElem = 
TrustUtil.createBinarySecretElement(wstVersion,
                                                                            
reqProofTokElem,
                                                                            
null);
-                binSecElem.setText(Base64.encode(secret));
+                binSecElem.setText(Base64Utils.encode(secret));
                 token.setSecret(secret);
             } else {
                 throw new IllegalArgumentException(config.proofKeyType);


Reply via email to