ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1669794 [3/3] - in /webservices/wss4j/trunk: integration/src/test/java/org/apache/wss4j/integration/test/kerberos/ ws-security-dom/src/main/java/org/apache/wss4j/dom/ ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/ ws-security-...
Date Sat, 28 Mar 2015 15:39:04 GMT
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java Sat Mar 28 15:39:03 2015
@@ -31,6 +31,7 @@ import org.apache.wss4j.dom.common.SAML1
 import org.apache.wss4j.dom.common.SAML2CallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoFactory;
 import org.apache.wss4j.common.crypto.Merlin;
@@ -42,7 +43,6 @@ import org.apache.wss4j.common.util.Load
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.message.WSSecEncrypt;
 import org.apache.wss4j.dom.message.WSSecHeader;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -130,15 +130,15 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, crypto, null);
+        WSHandlerResult results = verify(signedDoc, crypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -194,15 +194,15 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, crypto, null);
+        WSHandlerResult results = verify(signedDoc, crypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -259,16 +259,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto, null);
+        WSHandlerResult results = verify(signedDoc, trustCrypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -324,16 +324,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto, null);
+        WSHandlerResult results = verify(signedDoc, trustCrypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -458,16 +458,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(doc, trustCrypto, userCrypto);
+        WSHandlerResult results = verify(doc, trustCrypto, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed an encrypted element
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -534,16 +534,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(doc, trustCrypto, userCrypto);
+        WSHandlerResult results = verify(doc, trustCrypto, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed an encrypted element
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -593,15 +593,15 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, crypto, null);
+        WSHandlerResult results = verify(signedDoc, crypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -656,15 +656,15 @@ public class SamlReferenceTest extends o
         assertFalse(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, crypto, null);
+        WSHandlerResult results = verify(signedDoc, crypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -721,16 +721,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto, null);
+        WSHandlerResult results = verify(signedDoc, trustCrypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -786,16 +786,16 @@ public class SamlReferenceTest extends o
         assertFalse(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto, null);
+        WSHandlerResult results = verify(signedDoc, trustCrypto, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult =  results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -861,16 +861,16 @@ public class SamlReferenceTest extends o
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(doc, trustCrypto, userCrypto);
+        WSHandlerResult results = verify(doc, trustCrypto, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed an encrypted element
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult =  results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -937,16 +937,16 @@ public class SamlReferenceTest extends o
         assertFalse(outputString.contains(WSConstants.WSS_SAML2_KI_VALUE_TYPE));
         assertTrue(outputString.contains(WSConstants.WSS_SAML2_TOKEN_TYPE));
         
-        List<WSSecurityEngineResult> results = verify(doc, trustCrypto, userCrypto);
+        WSHandlerResult results = verify(doc, trustCrypto, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed an encrypted element
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult =  results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -966,10 +966,10 @@ public class SamlReferenceTest extends o
      * @param doc
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, Crypto verifyCrypto, Crypto decCrypto
     ) throws Exception {
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, verifyCrypto, decCrypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenActionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenActionTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenActionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenActionTest.java Sat Mar 28 15:39:03 2015
@@ -33,7 +33,6 @@ import org.apache.wss4j.common.util.XMLU
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.WSSConfig;
 import org.apache.wss4j.dom.WSSecurityEngine;
-import org.apache.wss4j.dom.WSSecurityEngineResult;
 import org.apache.wss4j.dom.common.CustomHandler;
 import org.apache.wss4j.dom.common.CustomSamlAssertionValidator;
 import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
@@ -43,6 +42,7 @@ import org.apache.wss4j.dom.common.Secur
 import org.apache.wss4j.dom.handler.HandlerAction;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 
 /**
  * Test-case for sending SAML Assertions using the "action" approach.
@@ -179,10 +179,10 @@ public class SamlTokenActionTest extends
         verify(doc, callbackHandler);
     }
     
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, CallbackHandler callbackHandler
     ) throws Exception {
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java Sat Mar 28 15:39:03 2015
@@ -38,7 +38,6 @@ import org.apache.wss4j.common.util.XMLU
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.WSSConfig;
 import org.apache.wss4j.dom.WSSecurityEngine;
-import org.apache.wss4j.dom.WSSecurityEngineResult;
 import org.apache.wss4j.dom.common.CustomHandler;
 import org.apache.wss4j.dom.common.SAML1CallbackHandler;
 import org.apache.wss4j.dom.common.SAML2CallbackHandler;
@@ -47,6 +46,7 @@ import org.apache.wss4j.dom.common.Secur
 import org.apache.wss4j.dom.handler.HandlerAction;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSignature;
 import org.apache.wss4j.dom.validate.SamlAssertionValidator;
@@ -276,13 +276,13 @@ public class SamlTokenCustomSignatureTes
      * @param doc
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
+    private WSHandlerResult verify(Document doc) throws Exception {
         WSSecurityEngine secEngine = new WSSecurityEngine();
         WSSConfig config = WSSConfig.getNewInstance();
         config.setValidateSamlSubjectConfirmation(false);
         secEngine.setWssConfig(config);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(
                 doc, null, null, crypto
             );
@@ -291,7 +291,7 @@ public class SamlTokenCustomSignatureTes
         return results;
     }
 
-    private List<WSSecurityEngineResult> verifyWithoutProfile(Document doc) throws Exception {
+    private WSHandlerResult verifyWithoutProfile(Document doc) throws Exception {
         SamlAssertionValidator validator = new SamlAssertionValidator();
         validator.setValidateSignatureAgainstProfile(false);
         
@@ -300,7 +300,7 @@ public class SamlTokenCustomSignatureTes
         config.setValidator(WSSecurityEngine.SAML_TOKEN, validator);
         config.setValidator(WSSecurityEngine.SAML2_TOKEN, validator);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(
                 doc, null, null, crypto
             );

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java Sat Mar 28 15:39:03 2015
@@ -44,6 +44,7 @@ import org.apache.wss4j.dom.common.Keyst
 import org.apache.wss4j.dom.common.SAML1CallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecDKSign;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
@@ -114,15 +115,15 @@ public class SamlTokenDerivedTest extend
         }
         
         // Test we processed a SAML assertion
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -202,8 +203,8 @@ public class SamlTokenDerivedTest extend
      * @param envelope 
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
-        List<WSSecurityEngineResult> results = 
+    private WSHandlerResult verify(Document doc) throws Exception {
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java Sat Mar 28 15:39:03 2015
@@ -29,6 +29,7 @@ import org.apache.wss4j.dom.common.SAML1
 import org.apache.wss4j.dom.common.SAML2CallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoFactory;
 import org.apache.wss4j.common.saml.SAMLCallback;
@@ -38,11 +39,8 @@ import org.apache.wss4j.common.saml.buil
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSAMLToken;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
-import java.util.List;
-
 /**
  * Test-case for sending and processing a signed (holder-of-key) SAML Assertion. These tests
  * just cover the case of creating and signing the Assertion, and not using the credential 
@@ -98,9 +96,9 @@ public class SamlTokenHOKTest extends or
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -140,14 +138,14 @@ public class SamlTokenHOKTest extends or
         }
         
         Crypto decCrypto = CryptoFactory.getInstance("wss40.properties");
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, new KeystoreCallbackHandler(), crypto, decCrypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);
         assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
         
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -185,9 +183,9 @@ public class SamlTokenHOKTest extends or
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -227,14 +225,14 @@ public class SamlTokenHOKTest extends or
         }
         
         Crypto decCrypto = CryptoFactory.getInstance("wss40.properties");
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, new KeystoreCallbackHandler(), crypto, decCrypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);
         assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
         
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -247,8 +245,8 @@ public class SamlTokenHOKTest extends or
      * @param envelope 
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
-        List<WSSecurityEngineResult> results = 
+    private WSHandlerResult verify(Document doc) throws Exception {
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, null, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java Sat Mar 28 15:39:03 2015
@@ -40,8 +40,8 @@ import org.apache.wss4j.common.saml.buil
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecHeader;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
 import java.util.Collections;
@@ -105,15 +105,15 @@ public class SamlTokenSVTest extends org
         }
         
         // Test we processed a SAML assertion
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -165,15 +165,15 @@ public class SamlTokenSVTest extends org
         }
         
         // Test we processed a SAML assertion
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -225,15 +225,15 @@ public class SamlTokenSVTest extends org
         }
         
         // Test we processed a SAML assertion
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -285,15 +285,15 @@ public class SamlTokenSVTest extends org
         }
         
         // Test we processed a SAML assertion
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         
         // Test we processed a signature (SAML assertion + SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -365,8 +365,8 @@ public class SamlTokenSVTest extends org
      * @param envelope 
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
-        List<WSSecurityEngineResult> results = 
+    private WSHandlerResult verify(Document doc) throws Exception {
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java Sat Mar 28 15:39:03 2015
@@ -61,9 +61,9 @@ import org.apache.wss4j.dom.common.Secur
 import org.apache.wss4j.dom.handler.HandlerAction;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSAMLToken;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 import org.apache.xml.security.encryption.EncryptedData;
 import org.apache.xml.security.encryption.EncryptedKey;
@@ -112,10 +112,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
         callbackHandler.setIssuer("www.example.com");
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -133,11 +134,11 @@ public class SamlTokenTest extends org.j
         SAMLElementCallbackHandler callbackHandler = new SAMLElementCallbackHandler();
         callbackHandler.setIssuer("www.example.com");
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -154,11 +155,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setStatement(SAML1CallbackHandler.Statement.ATTR);
         callbackHandler.setIssuer("www.example.com");
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -175,11 +176,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setIssuer("www.example.com");
         callbackHandler.setResource("http://resource.org");
 
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -195,11 +196,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
         callbackHandler.setIssuer("www.example.com");
 
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -215,11 +216,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setStatement(SAML2CallbackHandler.Statement.ATTR);
         callbackHandler.setIssuer("www.example.com");
 
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -236,11 +237,11 @@ public class SamlTokenTest extends org.j
         callbackHandler.setIssuer("www.example.com");
         callbackHandler.setResource("http://resource.org");
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             createAndVerifyMessage(callbackHandler, true);
-        
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -277,9 +278,10 @@ public class SamlTokenTest extends org.j
         }
         assertFalse (outputString.contains("Signature"));
         
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -345,9 +347,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains(SAML1Constants.NAMEID_FORMAT_EMAIL_ADDRESS));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -385,9 +388,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains(SAML1Constants.NAMEID_FORMAT_EMAIL_ADDRESS));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -426,9 +430,10 @@ public class SamlTokenTest extends org.j
         assertTrue(outputString.contains("12.34.56.78"));
         assertTrue(outputString.contains("test-dns"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -466,9 +471,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains("SessionNotOnOrAfter"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -507,9 +513,10 @@ public class SamlTokenTest extends org.j
         assertTrue(outputString.contains("12.34.56.78"));
         assertTrue(outputString.contains("test-dns"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -547,9 +554,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains("http://resource.org"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -606,9 +614,10 @@ public class SamlTokenTest extends org.j
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -639,11 +648,10 @@ public class SamlTokenTest extends org.j
         attributeValues.add(attributeValue);
         callbackHandler.setCustomAttributeValues(attributeValues);
 
-        List<WSSecurityEngineResult> results = 
-            createAndVerifyMessage(callbackHandler, true);
-        
+        WSHandlerResult results = createAndVerifyMessage(callbackHandler, true);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -687,9 +695,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains("http://recipient.apache.org"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = createAndVerifyMessage(callbackHandler, true);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -744,18 +753,19 @@ public class SamlTokenTest extends org.j
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, new KeystoreCallbackHandler(), crypto);
         
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.getElement() != null);
         assertTrue("Assertion".equals(receivedSamlAssertion.getElement().getLocalName()));
         
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
     }
     
@@ -817,18 +827,18 @@ public class SamlTokenTest extends org.j
         config.setValidateSamlSubjectConfirmation(false);
         newEngine.setWssConfig(config);
         
-        List<WSSecurityEngineResult> results = 
-            newEngine.processSecurityHeader(doc, "", data);
+        WSHandlerResult results = newEngine.processSecurityHeader(doc, data);
         
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.getElement() != null);
         assertTrue("Assertion".equals(receivedSamlAssertion.getElement().getLocalName()));
         
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+        actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
     }
     
@@ -1024,9 +1034,10 @@ public class SamlTokenTest extends org.j
         }
         assertTrue(outputString.contains("Advice"));
         
-        List<WSSecurityEngineResult> results = verify(unsignedDoc);
+        WSHandlerResult results = verify(unsignedDoc);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_UNSIGNED);
+            results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
+        
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -1091,7 +1102,7 @@ public class SamlTokenTest extends org.j
         cipher.doFinal(document, elementToEncrypt, content);
     }
     
-    private List<WSSecurityEngineResult> createAndVerifyMessage(
+    private WSHandlerResult createAndVerifyMessage(
         CallbackHandler samlCallbackHandler, boolean success
     ) throws Exception {
         SAMLCallback samlCallback = new SAMLCallback();
@@ -1113,7 +1124,7 @@ public class SamlTokenTest extends org.j
         }
 
         try {
-            List<WSSecurityEngineResult> results = verify(unsignedDoc);
+            WSHandlerResult results = verify(unsignedDoc);
             if (!success) {
                 fail("Failure expected in processing the SAML assertion");
             }
@@ -1132,8 +1143,8 @@ public class SamlTokenTest extends org.j
      * @param envelope 
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
-        List<WSSecurityEngineResult> results = 
+    private WSHandlerResult verify(Document doc) throws Exception {
+        WSHandlerResult results = 
                 secEngine.processSecurityHeader(doc, null, null, null);
         String outputString = 
                 XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java Sat Mar 28 15:39:03 2015
@@ -30,6 +30,7 @@ import org.apache.wss4j.dom.common.SAML1
 import org.apache.wss4j.dom.common.SAML2CallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoFactory;
 import org.apache.wss4j.common.crypto.CryptoType;
@@ -42,7 +43,6 @@ import org.apache.wss4j.common.saml.buil
 import org.apache.wss4j.common.util.Loader;
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.message.WSSecHeader;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -129,11 +129,11 @@ public class SignedSamlTokenHOKTest exte
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmlenc#sha256"));
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
@@ -150,7 +150,7 @@ public class SignedSamlTokenHOKTest exte
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Header/wsse:Security/saml1:Assertion", xpath);
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         refs = (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -199,18 +199,18 @@ public class SignedSamlTokenHOKTest exte
         }
         
         /* https://issues.apache.org/jira/browse/WSS-265 */
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         @SuppressWarnings("unchecked")
@@ -262,18 +262,18 @@ public class SignedSamlTokenHOKTest exte
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmlenc#sha256"));
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -324,18 +324,18 @@ public class SignedSamlTokenHOKTest exte
         }
         
         /* https://issues.apache.org/jira/browse/WSS-265 */
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         @SuppressWarnings("unchecked")
@@ -388,16 +388,16 @@ public class SignedSamlTokenHOKTest exte
         }
         assertTrue(outputString.contains("X509IssuerSerial"));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, userCrypto);
+        WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -449,16 +449,16 @@ public class SignedSamlTokenHOKTest exte
         }
         assertTrue(outputString.contains("KeyValue"));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, userCrypto);
+        WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assert receivedSamlAssertion.isSigned();
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -510,16 +510,16 @@ public class SignedSamlTokenHOKTest exte
         }
         assertTrue(outputString.contains("KeyValue"));
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, userCrypto);
+        WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -575,18 +575,18 @@ public class SignedSamlTokenHOKTest exte
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedSamlAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final List<WSDataRef> refs =
@@ -653,18 +653,18 @@ public class SignedSamlTokenHOKTest exte
         System.out.println(outputString);
         
         /* https://issues.apache.org/jira/browse/WSS-265 */
-        List<WSSecurityEngineResult> results = verify(signedDoc, trustCrypto);
+        WSHandlerResult results = verify(signedDoc, trustCrypto);
         
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ST_SIGNED);
+            results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
         SamlAssertionWrapper receivedAssertion =
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
         
         // Test we processed a signature (SOAP body)
-        actionResult = WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         @SuppressWarnings("unchecked")
@@ -683,8 +683,8 @@ public class SignedSamlTokenHOKTest exte
      * @param doc
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc, Crypto sigCrypto) throws Exception {
-        List<WSSecurityEngineResult> results = 
+    private WSHandlerResult verify(Document doc, Crypto sigCrypto) throws Exception {
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(
                 doc, null, callbackHandler, sigCrypto, userCrypto
             );

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java Sat Mar 28 15:39:03 2015
@@ -45,6 +45,7 @@ import org.apache.wss4j.dom.common.SOAPU
 import org.apache.wss4j.dom.common.SecurityTestUtil;
 import org.apache.wss4j.dom.common.UsernamePasswordCallbackHandler;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSignature;
 import org.apache.wss4j.dom.message.WSSecTimestamp;
@@ -130,7 +131,7 @@ public class ValidatorTest extends org.j
         data.setSigVerCrypto(cryptoCA);
         data.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3063));
         try {
-            newEngine.processSecurityHeader(signedDoc, "", data);
+            newEngine.processSecurityHeader(signedDoc, data);
             fail("Failure expected on issuer serial");
         } catch (WSSecurityException ex) {
             // expected
@@ -141,7 +142,7 @@ public class ValidatorTest extends org.j
         config.setValidator(WSSecurityEngine.SIGNATURE, NoOpValidator.class);
         newEngine.setWssConfig(config);
         data.setWssConfig(config);
-        newEngine.processSecurityHeader(signedDoc, "", data);
+        newEngine.processSecurityHeader(signedDoc, data);
     }
     
     /**
@@ -210,11 +211,13 @@ public class ValidatorTest extends org.j
         config.setValidator(WSSecurityEngine.BINARY_TOKEN, new BSTValidator());
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(config);
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, null, crypto);
         
-        WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+        List<WSSecurityEngineResult> bstResults = 
+            results.getActionResults().get(WSConstants.BST);
+        WSSecurityEngineResult actionResult = bstResults.get(0);
+
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         assertTrue(token != null);
@@ -258,11 +261,13 @@ public class ValidatorTest extends org.j
         }
         
         config.setValidator(WSSecurityEngine.BINARY_TOKEN, new BSTValidator());
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, null, crypto);
         
-        WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+        List<WSSecurityEngineResult> bstResults = 
+            results.getActionResults().get(WSConstants.BST);
+        WSSecurityEngineResult actionResult = bstResults.get(0);
+        
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         assertTrue(token != null);
@@ -276,7 +281,7 @@ public class ValidatorTest extends org.j
      * @param wssConfig
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private java.util.List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, WSSConfig wssConfig, CallbackHandler cb, Crypto crypto
     ) throws Exception {
         secEngine.setWssConfig(wssConfig);

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java Sat Mar 28 15:39:03 2015
@@ -486,13 +486,14 @@ public abstract class AbstractTestBase e
              */
             WSSConfig wssConfig = WSSConfig.getNewInstance();
             reqData.setWssConfig(wssConfig);
+            reqData.setActor(actor);
             doReceiverAction(actions, reqData);
 
             Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
 
             WSSecurityEngine secEngine = new WSSecurityEngine();
             secEngine.setWssConfig(wssConfig);
-            List<WSSecurityEngineResult> wsResult = null;
+            WSHandlerResult wsResult = null;
             try {
                 wsResult = secEngine.processSecurityHeader(elem, reqData);
             } catch (WSSecurityException ex) {
@@ -503,7 +504,7 @@ public abstract class AbstractTestBase e
                         "WSS4JHandler: security processing failed", ex
                 );
             }
-            if (wsResult == null || wsResult.size() == 0) {
+            if (wsResult.getResults() == null || wsResult.getResults().size() == 0) {
                 // no security header found
                 if (actions.isEmpty()) {
                     return true;
@@ -514,7 +515,7 @@ public abstract class AbstractTestBase e
                 }
             }
             if (reqData.getWssConfig().isEnableSignatureConfirmation() && !isRequest) {
-                checkSignatureConfirmation(reqData, wsResult);
+                checkSignatureConfirmation(reqData, wsResult.getResults());
             }
 
             if (doDebug) {
@@ -524,7 +525,7 @@ public abstract class AbstractTestBase e
             /*
              * now check the security actions: do they match, in right order?
              */
-            if (!checkReceiverResults(wsResult, actions)) {
+            if (!checkReceiverResults(wsResult.getResults(), actions)) {
                 throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty",
                         "WSS4JHandler: security processing failed (actions mismatch)"
                 );
@@ -540,8 +541,7 @@ public abstract class AbstractTestBase e
                 results = new ArrayList<WSHandlerResult>();
                 mc.put(WSHandlerConstants.RECV_RESULTS, results);
             }
-            WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
-            results.add(0, rResult);
+            results.add(0, wsResult);
             if (doDebug) {
                 log.debug("WSS4JHandler: exit invoke()");
             }
@@ -551,9 +551,9 @@ public abstract class AbstractTestBase e
 
         @Override
         protected boolean checkReceiverResults(
-                List<WSSecurityEngineResult> wsResult, List<Integer> actions
+            List<WSSecurityEngineResult> wsResult, List<Integer> actions
         ) {
-            List<WSSecurityEngineResult> wsSecurityEngineResults = new ArrayList<WSSecurityEngineResult>();
+            List<WSSecurityEngineResult> wsSecurityEngineResults = new ArrayList<>();
             for (WSSecurityEngineResult result : wsResult) {
                 boolean found = false;
                 for (WSSecurityEngineResult res : wsSecurityEngineResults) {



Mime
View raw message