ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1669794 [1/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
Author: coheigea
Date: Sat Mar 28 15:39:03 2015
New Revision: 1669794

URL: http://svn.apache.org/r1669794
Log:
Changing how results are returned from the processing stage

Modified:
    webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSDocInfo.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSSecurityEngine.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerResult.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomActionProcessorTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SecurityActionTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureUTAliasTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyActionTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionAlgorithmSuiteTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ModifiedRequestTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/PasswordEncryptorTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ReplayTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/RequireSignedEncryptedDataElementsTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SKISignatureTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertConstraintsTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureEncryptionTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignedBSTTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTDerivedKeyTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTSignatureTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BinarySecurityTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/EncryptedKeyDataRefTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/ReferenceListDataRefTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlAlgorithmSuiteTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlAuthnTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlConditionsTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlNegativeTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenActionTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
    webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
    webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java

Modified: webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java (original)
+++ webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java Sat Mar 28 15:39:03 2015
@@ -65,6 +65,7 @@ import org.apache.wss4j.dom.WSSConfig;
 import org.apache.wss4j.dom.WSSecurityEngine;
 import org.apache.wss4j.dom.WSSecurityEngineResult;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.WSSecEncrypt;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSignature;
@@ -259,10 +260,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
 
-        List<WSSecurityEngineResult> results =
+        WSHandlerResult results =
             secEngine.processSecurityHeader(doc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -412,10 +413,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -490,10 +491,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -563,10 +564,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(encryptedDoc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -636,10 +637,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(encryptedDoc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -711,10 +712,10 @@ public class KerberosTest extends Abstra
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(wssConfig);
         
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(encryptedDoc, null, callbackHandler, null);
         WSSecurityEngineResult actionResult =
-            WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+            results.getActionResults().get(WSConstants.BST).get(0);
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         Assert.assertTrue(token != null);
@@ -793,10 +794,10 @@ public class KerberosTest extends Abstra
                 }
             };
 
-            List<WSSecurityEngineResult> results =
+            WSHandlerResult results =
                     secEngine.processSecurityHeader(document, null, callbackHandler, null);
             WSSecurityEngineResult actionResult =
-                    WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+                    results.getActionResults().get(WSConstants.BST).get(0);
             BinarySecurity token =
                     (BinarySecurity) actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
             Assert.assertTrue(token != null);
@@ -1059,10 +1060,10 @@ public class KerberosTest extends Abstra
                 }
             };
 
-            List<WSSecurityEngineResult> results =
+            WSHandlerResult results =
                     secEngine.processSecurityHeader(document, null, callbackHandler, null);
             WSSecurityEngineResult actionResult =
-                    WSSecurityUtil.fetchActionResult(results, WSConstants.BST);
+                    results.getActionResults().get(WSConstants.BST).get(0);
             BinarySecurity token =
                     (BinarySecurity) actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
             Assert.assertTrue(token != null);

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSDocInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSDocInfo.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSDocInfo.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSDocInfo.java Sat Mar 28 15:39:03 2015
@@ -33,6 +33,7 @@ package org.apache.wss4j.dom;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
@@ -55,7 +56,8 @@ public class WSDocInfo {
     // creation or validation
     private final Map<String, TokenValue> tokens = new HashMap<>();
 
-    private final List<WSSecurityEngineResult> results = new ArrayList<>();
+    private final List<WSSecurityEngineResult> results = new LinkedList<>();
+    private final Map<Integer, List<WSSecurityEngineResult>> actionResults = new HashMap<>();
     private CallbackLookup callbackLookup;
     private Element securityHeader;
 
@@ -82,6 +84,7 @@ public class WSDocInfo {
         securityHeader = null;
         tokens.clear();
         results.clear();
+        actionResults.clear();
     }
     
     /**
@@ -208,6 +211,37 @@ public class WSDocInfo {
      */
     public void addResult(WSSecurityEngineResult result) {
         results.add(result);
+        Integer resultTag = (Integer)result.get(WSSecurityEngineResult.TAG_ACTION);
+        if (resultTag != null) {
+            List<WSSecurityEngineResult> storedResults = actionResults.get(resultTag);
+            if (storedResults == null) {
+                storedResults = new ArrayList<>();
+            }
+            storedResults.add(result);
+            actionResults.put(resultTag, storedResults);
+        }
+    }
+    
+    /**
+     * Get a copy of the security results list. Modifying the subsequent list does not
+     * change the internal results list.
+     */
+    public List<WSSecurityEngineResult> getResults() {
+        if (results.isEmpty()) {
+            return Collections.emptyList();
+        }
+        return new ArrayList<>(results);
+    }
+    
+    /**
+     * Return a copy of the map between security actions + results. Modifying the subsequent
+     * map does not change the internal map.
+     */
+    public Map<Integer, List<WSSecurityEngineResult>> getActionResults() {
+        if (actionResults.isEmpty()) {
+            return Collections.emptyMap();
+        }
+        return new HashMap<>(actionResults);
     }
     
     /**
@@ -233,21 +267,14 @@ public class WSDocInfo {
     }
     
     /**
-     * Get a list of WSSecurityEngineResults of the given Integer tag
+     * Get a unmodifiable list of WSSecurityEngineResults of the given Integer tag
      */
     public List<WSSecurityEngineResult> getResultsByTag(Integer tag) {
-        if (results.isEmpty()) {
+        if (actionResults.isEmpty() || !actionResults.containsKey(tag)) {
             return Collections.emptyList();
         }
         
-        List<WSSecurityEngineResult> foundResults = new ArrayList<>();
-        for (WSSecurityEngineResult result : results) {
-            Integer resultTag = (Integer)result.get(WSSecurityEngineResult.TAG_ACTION);
-            if (tag.intValue() == resultTag.intValue()) {
-                foundResults.add(result);
-            }
-        }
-        return foundResults;
+        return Collections.unmodifiableList(actionResults.get(tag));
     }
     
     /**
@@ -259,15 +286,15 @@ public class WSDocInfo {
             return false;
         }
         
-        if (!results.isEmpty()) {
-            for (WSSecurityEngineResult result : results) {
-                Integer resultTag = (Integer)result.get(WSSecurityEngineResult.TAG_ACTION);
+        if (!actionResults.isEmpty() && actionResults.containsKey(tag)) {
+            for (WSSecurityEngineResult result : actionResults.get(tag)) {
                 String cId = (String)result.get(WSSecurityEngineResult.TAG_ID);
-                if (tag.intValue() == resultTag.intValue() && id.equals(cId)) {
+                if (id.equals(cId)) {
                     return true;
                 }
             }
         }
+
         return false;
     }
 

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSSecurityEngine.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSSecurityEngine.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSSecurityEngine.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSSecurityEngine.java Sat Mar 28 15:39:03 2015
@@ -22,6 +22,7 @@ package org.apache.wss4j.dom;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 
 import javax.security.auth.callback.CallbackHandler;
 import javax.xml.namespace.QName;
@@ -31,6 +32,7 @@ import org.apache.wss4j.common.crypto.Cr
 import org.apache.wss4j.common.derivedKey.ConversationConstants;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.message.CallbackLookup;
 import org.apache.wss4j.dom.message.DOMCallbackLookup;
 import org.apache.wss4j.dom.processor.Processor;
@@ -196,12 +198,12 @@ public class WSSecurityEngine {
      *               encryption and UsernameToken handling
      * @param crypto the object that implements the access to the keystore and the
      *               handling of certificates.
-     * @return a result list
+     * @return a WSHandlerResult Object containing the results of processing the security header
      * @throws WSSecurityException
      * @see WSSecurityEngine#processSecurityHeader(Element securityHeader, CallbackHandler cb,
      * Crypto sigVerCrypto, Crypto decCrypto)
      */
-    public List<WSSecurityEngineResult> processSecurityHeader(
+    public WSHandlerResult processSecurityHeader(
         Document doc,
         String actor,
         CallbackHandler cb,
@@ -227,12 +229,12 @@ public class WSSecurityEngine {
      *                  handling of certificates for Signature verification
      * @param decCrypto the object that implements the access to the keystore and the
      *                  handling of certificates for Decryption
-     * @return a result list
+     * @return a WSHandlerResult Object containing the results of processing the security header
      * @throws WSSecurityException
      * @see WSSecurityEngine#processSecurityHeader(
      * Element securityHeader, CallbackHandler cb, Crypto sigVerCrypto, Crypto decCrypto)
      */
-    public List<WSSecurityEngineResult> processSecurityHeader(
+    public WSHandlerResult processSecurityHeader(
         Document doc,
         String actor,
         CallbackHandler cb,
@@ -247,13 +249,13 @@ public class WSSecurityEngine {
         if (actor == null) {
             actor = "";
         }
-        List<WSSecurityEngineResult> wsResult = null;
+        WSHandlerResult wsResult = null;
         Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
         if (elem != null) {
             if (doDebug) {
                 LOG.debug("Processing WS-Security header for '" + actor + "' actor.");
             }
-            wsResult = processSecurityHeader(elem, cb, sigVerCrypto, decCrypto);
+            wsResult = processSecurityHeader(elem, actor, cb, sigVerCrypto, decCrypto);
         }
         return wsResult;
     }
@@ -290,20 +292,18 @@ public class WSSecurityEngine {
      *                       handling of certificates used for Signature verification
      * @param decCrypto      the object that implements the access to the keystore and the
      *                       handling of certificates used for Decryption
-     * @return a List of {@link WSSecurityEngineResult}. Each element in the
-     *         the List represents the result of a security action. The elements
-     *         are ordered according to the sequence of the security actions in the
-     *         wsse:Signature header. The List may be empty if no security processing
-     *         was performed.
+     * @return a WSHandlerResult Object containing the results of processing the security header
      * @throws WSSecurityException
      */
-    public List<WSSecurityEngineResult> processSecurityHeader(
+    public WSHandlerResult processSecurityHeader(
         Element securityHeader,
+        String actor,
         CallbackHandler cb,
         Crypto sigVerCrypto,
         Crypto decCrypto
     ) throws WSSecurityException { 
         RequestData data = new RequestData();
+        data.setActor(actor);
         data.setWssConfig(getWssConfig());
         data.setDecCrypto(decCrypto);
         data.setSigVerCrypto(sigVerCrypto);
@@ -319,22 +319,20 @@ public class WSSecurityEngine {
      * defined actor.
      *
      * @param doc       the SOAP envelope as {@link Document}
-     * @param actor     the engine works on behalf of this <code>actor</code>. Refer
-     *                  to the SOAP specification about <code>actor</code> or <code>role
-     *                  </code>
      * @param requestData    the RequestData associated with the request.  It should
      *                       be able to provide the callback handler, cryptos, etc...
      *                       as needed by the processing
-     * @return a result list
+     * @return a WSHandlerResult Object containing the results of processing the security header
      * @throws WSSecurityException
      */
-    public List<WSSecurityEngineResult> processSecurityHeader(
-        Document doc, String actor, RequestData requestData
+    public WSHandlerResult processSecurityHeader(
+        Document doc, RequestData requestData
     ) throws WSSecurityException {
-        if (actor == null) {
-            actor = "";
+        if (requestData.getActor() == null) {
+            requestData.setActor("");
         }
-        List<WSSecurityEngineResult> wsResult = null;
+        String actor = requestData.getActor();
+        WSHandlerResult wsResult = null;
         Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
         if (elem != null) {
             if (doDebug) {
@@ -374,19 +372,17 @@ public class WSSecurityEngine {
      * @param requestData    the RequestData associated with the request.  It should
      *                       be able to provide the callback handler, cryptos, etc...
      *                       as needed by the processing
-     * @return a List of {@link WSSecurityEngineResult}. Each element in the
-     *         the List represents the result of a security action. The elements
-     *         are ordered according to the sequence of the security actions in the
-     *         wsse:Signature header. The List may be empty if no security processing
-     *         was performed.
+     * @return a WSHandlerResult Object containing the results of processing the security header
      * @throws WSSecurityException
      */
-    public List<WSSecurityEngineResult> processSecurityHeader(
+    public WSHandlerResult processSecurityHeader(
         Element securityHeader,
         RequestData requestData
     ) throws WSSecurityException {
         if (securityHeader == null) {
-            return Collections.emptyList();
+            List<WSSecurityEngineResult> results = Collections.emptyList();
+            Map<Integer, List<WSSecurityEngineResult>> actionResults = Collections.emptyMap();
+            return new WSHandlerResult(null, results, actionResults);
         }
     
         if (requestData.getWssConfig() == null) {
@@ -463,8 +459,11 @@ public class WSSecurityEngine {
             DOMSAMLUtil.validateSAMLResults(returnResults, requestData.getTlsCerts(), bodyElement);
         }
         
+        WSHandlerResult handlerResult = 
+            new WSHandlerResult(requestData.getActor(), returnResults, wsDocInfo.getActionResults());
+        
         wsDocInfo.clear();
         
-        return returnResults;
+        return handlerResult;
     }
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerResult.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerResult.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerResult.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerResult.java Sat Mar 28 15:39:03 2015
@@ -20,20 +20,25 @@
 package org.apache.wss4j.dom.handler;
 
 import java.util.List;
+import java.util.Map;
+
 import org.apache.wss4j.dom.WSSecurityEngineResult;
 
 public class WSHandlerResult {
-    private String actor;
-    private List<WSSecurityEngineResult> wsSecurityResults;
+    private final String actor;
+    private final List<WSSecurityEngineResult> wsSecurityResults;
+    private final Map<Integer, List<WSSecurityEngineResult>> actionResults;
 
     /**
      * constructor
      * @param actor
      * @param results
      */ 
-    public WSHandlerResult(String actor, List<WSSecurityEngineResult> results) {
+    public WSHandlerResult(String actor, List<WSSecurityEngineResult> results,
+                           Map<Integer, List<WSSecurityEngineResult>> actionResults) {
         this.actor = actor;
         this.wsSecurityResults = results;
+        this.actionResults = actionResults;
     }
 
     /**
@@ -51,4 +56,8 @@ public class WSHandlerResult {
     public List<WSSecurityEngineResult> getResults() {
         return wsSecurityResults;
     }
+    
+    public Map<Integer, List<WSSecurityEngineResult>> getActionResults() {
+        return actionResults;
+    }
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java Sat Mar 28 15:39:03 2015
@@ -27,6 +27,7 @@ import org.apache.wss4j.dom.common.Keyst
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.common.bsp.BSPRule;
 import org.apache.wss4j.common.crypto.CertificateStore;
 import org.apache.wss4j.common.crypto.Crypto;
@@ -36,7 +37,6 @@ import org.apache.wss4j.common.ext.WSSec
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.WSSecSignature;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
 import java.security.cert.X509Certificate;
@@ -93,9 +93,10 @@ public class CertificateStoreTest extend
         //
         // Verify the signature
         //
-        List<WSSecurityEngineResult> results = verify(signedDoc, receiverCrypto);
-        WSSecurityEngineResult result = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        WSHandlerResult results = verify(signedDoc, receiverCrypto);
+        List<WSSecurityEngineResult> signatureResults = 
+            results.getActionResults().get(WSConstants.SIGN);
+        WSSecurityEngineResult result = signatureResults.get(0);
         X509Certificate cert = 
             (X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
         assertTrue (cert != null);
@@ -129,11 +130,11 @@ public class CertificateStoreTest extend
         data.setCallbackHandler(keystoreCallbackHandler);
         data.setSigVerCrypto(receiverCrypto);
         data.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3063));
-        List<WSSecurityEngineResult> results = 
-            newEngine.processSecurityHeader(signedDoc, "", data);
+        WSHandlerResult results = newEngine.processSecurityHeader(signedDoc, data);
         
-        WSSecurityEngineResult result = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        List<WSSecurityEngineResult> signatureResults = 
+            results.getActionResults().get(WSConstants.SIGN);
+        WSSecurityEngineResult result = signatureResults.get(0);
         X509Certificate cert = 
             (X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
         assertTrue (cert != null);
@@ -163,9 +164,11 @@ public class CertificateStoreTest extend
         //
         // Verify the signature
         //
-        List<WSSecurityEngineResult> results = verify(signedDoc, receiverCrypto);
-        WSSecurityEngineResult result = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        WSHandlerResult results = verify(signedDoc, receiverCrypto);
+        
+        List<WSSecurityEngineResult> signatureResults = 
+            results.getActionResults().get(WSConstants.SIGN);
+        WSSecurityEngineResult result = signatureResults.get(0);
         X509Certificate cert = 
             (X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
         assertTrue (cert != null);
@@ -195,9 +198,11 @@ public class CertificateStoreTest extend
         //
         // Verify the signature
         //
-        List<WSSecurityEngineResult> results = verify(signedDoc, receiverCrypto);
-        WSSecurityEngineResult result = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        WSHandlerResult results = verify(signedDoc, receiverCrypto);
+        List<WSSecurityEngineResult> signatureResults = 
+            results.getActionResults().get(WSConstants.SIGN);
+        WSSecurityEngineResult result = signatureResults.get(0);
+        
         X509Certificate cert = 
             (X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
         assertTrue (cert != null);
@@ -227,9 +232,11 @@ public class CertificateStoreTest extend
         //
         // Verify the signature
         //
-        List<WSSecurityEngineResult> results = verify(signedDoc, receiverCrypto);
-        WSSecurityEngineResult result = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+        WSHandlerResult results = verify(signedDoc, receiverCrypto);
+        
+        List<WSSecurityEngineResult> signatureResults = 
+            results.getActionResults().get(WSConstants.SIGN);
+        WSSecurityEngineResult result = signatureResults.get(0);
         X509Certificate cert = 
             (X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
         assertTrue (cert != null);
@@ -274,9 +281,8 @@ public class CertificateStoreTest extend
      * @param doc 
      * @throws Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> 
-    verify(Document doc, Crypto crypto) throws Exception {
-        List<WSSecurityEngineResult> results = secEngine.processSecurityHeader(
+    private WSHandlerResult verify(Document doc, Crypto crypto) throws Exception {
+        WSHandlerResult results = secEngine.processSecurityHeader(
             doc, null, keystoreCallbackHandler, crypto
         );
         if (LOG.isDebugEnabled()) {

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomActionProcessorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomActionProcessorTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomActionProcessorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomActionProcessorTest.java Sat Mar 28 15:39:03 2015
@@ -93,10 +93,10 @@ public class CustomActionProcessorTest e
         );
         final WSSecurityEngine engine = new WSSecurityEngine();
         engine.setWssConfig(cfg);
-        final List<WSSecurityEngineResult> results = 
+        final WSHandlerResult results = 
             engine.processSecurityHeader(doc, null, null, crypto);
         boolean found = false;
-        for (WSSecurityEngineResult result : results) {
+        for (WSSecurityEngineResult result : results.getResults()) {
             Object obj = result.get("foo");
             if (obj != null) {
                 if (obj.getClass().getName().equals(p)) {
@@ -140,10 +140,10 @@ public class CustomActionProcessorTest e
         );
         final WSSecurityEngine engine = new WSSecurityEngine();
         engine.setWssConfig(cfg);
-        final List<WSSecurityEngineResult> results = 
+        final WSHandlerResult results = 
             engine.processSecurityHeader(doc, null, null, crypto);
         boolean found = false;
-        for (WSSecurityEngineResult result : results) {
+        for (WSSecurityEngineResult result : results.getResults()) {
             Object obj = result.get("foo");
             if (obj != null) {
                 if (obj.getClass().getName().equals(CustomProcessor.class.getName())) {

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java Sat Mar 28 15:39:03 2015
@@ -39,7 +39,6 @@ import org.apache.wss4j.dom.common.SOAPU
 import org.apache.wss4j.dom.common.SecurityTestUtil;
 import org.apache.wss4j.dom.message.WSSecTimestamp;
 import org.apache.wss4j.dom.message.token.Timestamp;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -96,10 +95,10 @@ public class CustomTokenTest extends org
         }
         
         WSSecurityEngine secEngine = new WSSecurityEngine();
-        List<WSSecurityEngineResult> wsResults = 
+        WSHandlerResult wsResults = 
             secEngine.processSecurityHeader(doc, null, null, null);
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(wsResults, WSConstants.TS);
+            wsResults.getActionResults().get(WSConstants.TS).get(0);
         assertTrue(actionResult != null);
         
         Timestamp receivedTimestamp = 

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SecurityActionTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SecurityActionTokenTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SecurityActionTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SecurityActionTokenTest.java Sat Mar 28 15:39:03 2015
@@ -39,7 +39,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.CombinedCallbackHandler;
 import org.apache.wss4j.dom.common.CustomHandler;
 import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
@@ -600,7 +599,7 @@ public class SecurityActionTokenTest ext
         verify(doc, secretKeyCallbackHandler);
     }
 
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, CallbackHandler callbackHandler
     ) throws Exception {
         return secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java Sat Mar 28 15:39:03 2015
@@ -184,12 +184,11 @@ public class SignatureConfirmationTest e
         //
         // Verify the inbound request, and create a response with a Signature Confirmation
         //
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         msgContext = (java.util.Map<String, Object>)reqData.getMsgContext();
-        WSHandlerResult handlerResult = new WSHandlerResult(null, results);
         List<WSHandlerResult> receivedResults = new ArrayList<>();
-        receivedResults.add(handlerResult);
+        receivedResults.add(results);
         msgContext.put(WSHandlerConstants.RECV_RESULTS, receivedResults);
         action = new HandlerAction(WSConstants.NO_SECURITY);
         handler.send(
@@ -242,12 +241,11 @@ public class SignatureConfirmationTest e
         //
         // Verify the inbound request, and create a response with a Signature Confirmation
         //
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         msgContext = (java.util.Map<String, Object>)reqData.getMsgContext();
-        WSHandlerResult handlerResult = new WSHandlerResult(null, results);
         List<WSHandlerResult> receivedResults = new ArrayList<>();
-        receivedResults.add(handlerResult);
+        receivedResults.add(results);
         msgContext.put(WSHandlerConstants.RECV_RESULTS, receivedResults);
         handler.send(
             doc, 
@@ -267,10 +265,10 @@ public class SignatureConfirmationTest e
         //
         results = verify(doc);
         WSSecurityEngineResult scResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SC);
+            results.getActionResults().get(WSConstants.SC).get(0);
         assertTrue(scResult != null);
         assertTrue(scResult.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION) != null);
-        handler.signatureConfirmation(reqData, results);
+        handler.signatureConfirmation(reqData, results.getResults());
     }
     
     
@@ -279,8 +277,7 @@ public class SignatureConfirmationTest e
      * the BSP compliance is enabled.
      */
     @org.junit.Test
-    public void
-    testWsuId() throws Exception {
+    public void testWsuId() throws Exception {
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader();
         secHeader.insertSecurityHeader(doc);
@@ -309,7 +306,7 @@ public class SignatureConfirmationTest e
         data.setCallbackHandler(callbackHandler);
         data.setSigVerCrypto(crypto);
         data.setIgnoredBSPRules(Collections.singletonList(BSPRule.R5441));
-        newEngine.processSecurityHeader(doc, "", data);
+        newEngine.processSecurityHeader(doc, data);
     }
     
     
@@ -320,8 +317,8 @@ public class SignatureConfirmationTest e
      * @param doc 
      * @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);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Verfied and decrypted message:");

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureUTAliasTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureUTAliasTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureUTAliasTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureUTAliasTest.java Sat Mar 28 15:39:03 2015
@@ -30,7 +30,6 @@ import javax.security.auth.callback.Unsu
 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.SOAPUtil;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
@@ -112,8 +111,8 @@ public class SignatureUTAliasTest extend
      * @param doc 
      * @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, this, CryptoFactory.getInstance("wss40CA.properties")
             );

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java Sat Mar 28 15:39:03 2015
@@ -28,7 +28,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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
@@ -90,10 +89,9 @@ public class UseReqSigCertTest extends o
         }
         
         // Process the request
-        List<WSSecurityEngineResult> results = processRequest(doc);
-        WSHandlerResult rResult = new WSHandlerResult("", results);
+        WSHandlerResult results = processRequest(doc);
         List<WSHandlerResult> handlerResults = new ArrayList<>();
-        handlerResults.add(0, rResult);
+        handlerResults.add(0, results);
         
         // Send the response
         sendResponse(handlerResults);
@@ -136,10 +134,9 @@ public class UseReqSigCertTest extends o
         }
         
         // Process the request
-        List<WSSecurityEngineResult> results = processRequest(doc);
-        WSHandlerResult rResult = new WSHandlerResult("", results);
+        WSHandlerResult results = processRequest(doc);
         List<WSHandlerResult> handlerResults = new ArrayList<>();
-        handlerResults.add(0, rResult);
+        handlerResults.add(0, results);
         
         // Send the response
         sendResponse(handlerResults);
@@ -182,16 +179,15 @@ public class UseReqSigCertTest extends o
         }
         
         // Process the request
-        List<WSSecurityEngineResult> results = processRequest(doc);
-        WSHandlerResult rResult = new WSHandlerResult("", results);
+        WSHandlerResult results = processRequest(doc);
         List<WSHandlerResult> handlerResults = new ArrayList<>();
-        handlerResults.add(0, rResult);
+        handlerResults.add(0, results);
         
         // Send the response
         sendResponse(handlerResults);
     }
     
-    private List<WSSecurityEngineResult> processRequest(Document doc) throws WSSecurityException {
+    private WSHandlerResult processRequest(Document doc) throws WSSecurityException {
         final WSSConfig cfg = WSSConfig.getNewInstance();
         final RequestData reqData = new RequestData();
         reqData.setWssConfig(cfg);
@@ -207,7 +203,7 @@ public class UseReqSigCertTest extends o
         handler.receive(receivedActions, reqData);
         
         WSSecurityEngine securityEngine = new WSSecurityEngine();
-        return securityEngine.processSecurityHeader(doc, "", reqData);
+        return securityEngine.processSecurityHeader(doc, reqData);
     }
     
     private void sendResponse(List<WSHandlerResult> handlerResults) throws Exception {

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java Sat Mar 28 15:39:03 2015
@@ -47,10 +47,10 @@ 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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.junit.Assert;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -1085,12 +1085,12 @@ public class AttachmentTest extends org.
      *
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc, CallbackHandler attachmentCallbackHandler) throws Exception {
+    private WSHandlerResult verify(Document doc, CallbackHandler attachmentCallbackHandler) throws Exception {
         RequestData requestData = new RequestData();
         requestData.setAttachmentCallbackHandler(attachmentCallbackHandler);
         requestData.setSigVerCrypto(crypto);
         requestData.setDecCrypto(crypto);
         requestData.setCallbackHandler(new KeystoreCallbackHandler());
-        return secEngine.processSecurityHeader(doc, null, requestData);
+        return secEngine.processSecurityHeader(doc, requestData);
     }
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyActionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyActionTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyActionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyActionTest.java Sat Mar 28 15:39:03 2015
@@ -35,7 +35,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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
@@ -44,6 +43,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.junit.Assert;
 
 /**
@@ -556,13 +556,13 @@ public class DerivedKeyActionTest extend
         verify(doc, secretKeyCallbackHandler);
     }
 
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
+    private WSHandlerResult verify(Document doc) throws Exception {
         return verify(doc, callbackHandler);
     }
 
-    private List<WSSecurityEngineResult> verify(Document doc, CallbackHandler cbHandler) throws Exception {
+    private WSHandlerResult verify(Document doc, CallbackHandler cbHandler) throws Exception {
         WSSecurityEngine secEngine = new WSSecurityEngine();
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, cbHandler, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java Sat Mar 28 15:39:03 2015
@@ -26,16 +26,15 @@ import org.apache.wss4j.dom.WSSecurityEn
 import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
 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;
 import org.apache.wss4j.common.token.SecurityTokenReference;
 import org.apache.wss4j.common.util.XMLUtils;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
 import java.security.cert.X509Certificate;
-import java.util.List;
 
 import javax.security.auth.callback.CallbackHandler;
 
@@ -167,10 +166,10 @@ public class DerivedKeyTest extends org.
                 XMLUtils.PrettyDocumentToString(doc);
             LOG.debug(outputString);
         }
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+            results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
@@ -209,10 +208,10 @@ public class DerivedKeyTest extends org.
                 XMLUtils.PrettyDocumentToString(doc);
             LOG.debug(outputString);
         }
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+            results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
@@ -250,10 +249,10 @@ public class DerivedKeyTest extends org.
                 XMLUtils.PrettyDocumentToString(doc);
             LOG.debug(outputString);
         }
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+            results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
@@ -349,8 +348,8 @@ public class DerivedKeyTest 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/message/EncryptedDataInHeaderTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java Sat Mar 28 15:39:03 2015
@@ -19,8 +19,6 @@
 
 package org.apache.wss4j.dom.message;
 
-import java.util.List;
-
 import javax.security.auth.callback.CallbackHandler;
 
 import org.apache.wss4j.dom.WSConstants;
@@ -30,6 +28,7 @@ import org.apache.wss4j.dom.WSSecurityEn
 import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
 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.WSEncryptionPart;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoFactory;
@@ -101,9 +100,9 @@ public class EncryptedDataInHeaderTest e
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(doc);
+        WSHandlerResult results = verify(doc);
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+            results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
     }
@@ -116,8 +115,8 @@ public class EncryptedDataInHeaderTest e
      * @param doc 
      * @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, null, crypto);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Verified and decrypted message:");

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionAlgorithmSuiteTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionAlgorithmSuiteTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionAlgorithmSuiteTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionAlgorithmSuiteTest.java Sat Mar 28 15:39:03 2015
@@ -19,8 +19,6 @@
 
 package org.apache.wss4j.dom.message;
 
-import java.util.List;
-
 import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
 
@@ -33,12 +31,12 @@ 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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
 import org.apache.wss4j.dom.common.SecretKeyCallbackHandler;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.xml.security.utils.Base64;
 import org.w3c.dom.Document;
@@ -285,7 +283,7 @@ public class EncryptionAlgorithmSuiteTes
         return algorithmSuite;
     }
 
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Element securityHeader, AlgorithmSuite algorithmSuite, Crypto decCrypto
     ) throws Exception {
         WSSecurityEngine secEngine = new WSSecurityEngine();

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java Sat Mar 28 15:39:03 2015
@@ -35,6 +35,7 @@ import org.apache.wss4j.common.crypto.Cr
 import org.apache.wss4j.common.util.DOM2Writer;
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.w3c.dom.Document;
 
 import java.util.ArrayList;
@@ -190,8 +191,7 @@ public class EncryptionGCMTest extends o
         requestData.setIgnoredBSPRules(bspRules);
         requestData.setCallbackHandler(handler);
         requestData.setDecCrypto(crypto);
-        final java.util.List<WSSecurityEngineResult> results =
-            secEngine.processSecurityHeader(doc, null, requestData);
+        final WSHandlerResult results = secEngine.processSecurityHeader(doc, requestData);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);
         if (LOG.isDebugEnabled()) {
@@ -204,7 +204,7 @@ public class EncryptionGCMTest extends o
         // (as a QName)
         //
         boolean encrypted = false;
-        for (java.util.Iterator<WSSecurityEngineResult> ipos = results.iterator(); 
+        for (java.util.Iterator<WSSecurityEngineResult> ipos = results.getResults().iterator(); 
             ipos.hasNext();) {
             final WSSecurityEngineResult result = ipos.next();
             final Integer action = (Integer) result.get(WSSecurityEngineResult.TAG_ACTION);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java Sat Mar 28 15:39:03 2015
@@ -28,6 +28,7 @@ import org.apache.wss4j.dom.WSSecurityEn
 import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
 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.WSEncryptionPart;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.crypto.CryptoFactory;
@@ -114,10 +115,10 @@ public class EncryptionPartsTest extends
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(encryptedDoc);
+        WSHandlerResult results = verify(encryptedDoc);
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+            results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final java.util.List<WSDataRef> refs =
@@ -277,10 +278,10 @@ public class EncryptionPartsTest extends
         assertTrue(outputString.contains("wsse11:EncryptedHeader"));
         assertFalse(outputString.contains("foo:foobar"));
         
-        List<WSSecurityEngineResult> results = verify(encryptedDoc);
+        WSHandlerResult results = verify(encryptedDoc);
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         final java.util.List<WSDataRef> refs =
@@ -390,14 +391,14 @@ public class EncryptionPartsTest extends
             LOG.debug(outputString);
         }
         
-        List<WSSecurityEngineResult> results = verify(encryptedDoc);
+        WSHandlerResult results = verify(encryptedDoc);
         
         QName fooName = new QName("urn:foo.bar", "foobar");
         QName bodyName = new QName(soapConstants.getEnvelopeURI(), "Body");
         QName headerName = new QName(soapConstants.getEnvelopeURI(), "Header");
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+            results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         
@@ -457,10 +458,10 @@ public class EncryptionPartsTest extends
             LOG.debug(outputString);
         }
         assertTrue (!outputString.contains("testMethod"));
-        List<WSSecurityEngineResult> results = verify(encryptedDoc);
+        WSHandlerResult results = verify(encryptedDoc);
         
         WSSecurityEngineResult actionResult = 
-            WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+            results.getActionResults().get(WSConstants.ENCR).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         @SuppressWarnings("unchecked")
@@ -517,8 +518,8 @@ public class EncryptionPartsTest extends
      * @param doc 
      * @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, null, crypto);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Verified and decrypted message:");

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java Sat Mar 28 15:39:03 2015
@@ -21,7 +21,6 @@ package org.apache.wss4j.dom.message;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.List;
 
 import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
@@ -49,6 +48,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.str.STRParser.REFERENCE_TYPE;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.xml.security.utils.Base64;
@@ -157,7 +157,7 @@ public class EncryptionTest extends org.
             LOG.debug(outputString);
         }
         assertFalse(outputString.contains("counter_port_type"));
-        List<WSSecurityEngineResult> results = verify(
+        WSHandlerResult results = verify(
             encryptedDoc,
             keystoreCallbackHandler,
             new javax.xml.namespace.QName(
@@ -167,7 +167,7 @@ public class EncryptionTest extends org.
         );
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE));
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_REFERENCE_TYPE));
         REFERENCE_TYPE referenceType = 
@@ -205,11 +205,11 @@ public class EncryptionTest extends org.
         assertFalse(outputString.contains("counter_port_type"));
         
         WSSecurityEngine newEngine = new WSSecurityEngine();
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             newEngine.processSecurityHeader(encryptedDoc, null, keystoreCallbackHandler, crypto);
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE));
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_REFERENCE_TYPE));
         REFERENCE_TYPE referenceType = 
@@ -286,10 +286,10 @@ public class EncryptionTest extends org.
         assertTrue(outputString.contains("#ThumbprintSHA1"));
     
         LOG.info("After Encrypting ThumbprintSHA1....");
-        List<WSSecurityEngineResult> results = verify(encryptedDoc, encCrypto, keystoreCallbackHandler);
+        WSHandlerResult results = verify(encryptedDoc, encCrypto, keystoreCallbackHandler);
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE));
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_REFERENCE_TYPE));
         REFERENCE_TYPE referenceType = 
@@ -503,14 +503,14 @@ public class EncryptionTest extends org.
             LOG.debug(outputString);
         }
         assertFalse(outputString.contains("counter_port_type"));
-        List<WSSecurityEngineResult> results = verify(encryptedDoc, crypto, keystoreCallbackHandler);
+        WSHandlerResult results = verify(encryptedDoc, crypto, keystoreCallbackHandler);
         
         outputString = 
             XMLUtils.PrettyDocumentToString(encryptedDoc);
         assertTrue(outputString.contains("counter_port_type"));
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE));
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_REFERENCE_TYPE));
         REFERENCE_TYPE referenceType = 
@@ -584,7 +584,7 @@ public class EncryptionTest extends org.
         data.setCallbackHandler(keystoreCallbackHandler);
         data.setDecCrypto(crypto);
         data.setIgnoredBSPRules(Collections.singletonList(BSPRule.R3209));
-        newEngine.processSecurityHeader(encryptedDoc, "", data);
+        newEngine.processSecurityHeader(encryptedDoc, data);
     }
     
     /**
@@ -651,11 +651,11 @@ public class EncryptionTest extends org.
         assertTrue(!outputString.contains("counter_port_type") ? true : false);
         
         WSSecurityEngine newEngine = new WSSecurityEngine();
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             newEngine.processSecurityHeader(encryptedDoc, null, keystoreCallbackHandler, crypto);
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.ENCR);
+                results.getActionResults().get(WSConstants.ENCR).get(0);
         assertNotNull(actionResult);
     }
     
@@ -694,10 +694,10 @@ public class EncryptionTest extends org.
      * @throws Exception
      *             Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, Crypto decCrypto, CallbackHandler handler
     ) throws Exception {
-        List<WSSecurityEngineResult> results = 
+        WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, handler, decCrypto);
         if (LOG.isDebugEnabled()) {
             String outputString = 
@@ -715,12 +715,12 @@ public class EncryptionTest extends org.
      * @throws Exception Thrown when there is a problem in verification
      */
     @SuppressWarnings("unchecked")
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc,
         CallbackHandler handler,
         javax.xml.namespace.QName expectedEncryptedElement
     ) throws Exception {
-        final java.util.List<WSSecurityEngineResult> results = 
+        final WSHandlerResult results = 
             secEngine.processSecurityHeader(doc, null, handler, null, crypto);
         String outputString = 
             XMLUtils.PrettyDocumentToString(doc);
@@ -734,7 +734,7 @@ public class EncryptionTest extends org.
         // (as a QName)
         //
         boolean encrypted = false;
-        for (java.util.Iterator<WSSecurityEngineResult> ipos = results.iterator(); 
+        for (java.util.Iterator<WSSecurityEngineResult> ipos = results.getResults().iterator(); 
             ipos.hasNext();) {
             final WSSecurityEngineResult result = ipos.next();
             final Integer action = (Integer) result.get(WSSecurityEngineResult.TAG_ACTION);

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ModifiedRequestTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ModifiedRequestTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ModifiedRequestTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ModifiedRequestTest.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.saml.WSSecSignatureSAML;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.wss4j.dom.util.XmlSchemaDateFormat;
@@ -188,7 +189,7 @@ public class ModifiedRequestTest extends
         //
         // Check the signature...this should pass
         //
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         
         //
         // Finally we need to check that the Element that was signed is what we expect to be signed
@@ -204,7 +205,7 @@ public class ModifiedRequestTest extends
             ).item(0);
         
         List<WSSecurityEngineResult> signedResults = 
-            WSSecurityUtil.fetchAllActionResults(results, WSConstants.SIGN);
+            results.getActionResults().get(WSConstants.SIGN);
         try {
             WSSecurityUtil.verifySignedElement((org.w3c.dom.Element)valueNode, signedResults);
             fail("Failure expected on the required element not being signed");
@@ -626,7 +627,7 @@ public class ModifiedRequestTest extends
      * @param doc soap envelope
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult>  verify(Document doc) throws Exception {
+    private WSHandlerResult verify(Document doc) throws Exception {
         return secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
     }
 

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/PasswordEncryptorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/PasswordEncryptorTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/PasswordEncryptorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/PasswordEncryptorTest.java Sat Mar 28 15:39:03 2015
@@ -20,7 +20,6 @@
 package org.apache.wss4j.dom.message;
 
 import java.util.Collections;
-import java.util.List;
 import java.util.Properties;
 
 import javax.security.auth.callback.CallbackHandler;
@@ -34,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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
@@ -42,6 +40,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.w3c.dom.Document;
 
 
@@ -189,7 +188,7 @@ public class PasswordEncryptorTest exten
      * @param env soap envelope
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
+    private WSHandlerResult verify(Document doc) throws Exception {
         return secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
     }
 

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ReplayTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ReplayTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ReplayTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/ReplayTest.java Sat Mar 28 15:39:03 2015
@@ -26,7 +26,6 @@ import javax.security.auth.callback.Call
 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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SAML2CallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
@@ -44,6 +43,7 @@ import org.apache.wss4j.common.saml.bean
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 import org.w3c.dom.Document;
@@ -545,7 +545,7 @@ public class ReplayTest extends org.juni
      * @param wssConfig
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Document doc, WSSConfig wssConfig, RequestData data
     ) throws Exception {
         WSSecurityEngine secEngine = new WSSecurityEngine();

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/RequireSignedEncryptedDataElementsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/RequireSignedEncryptedDataElementsTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/RequireSignedEncryptedDataElementsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/RequireSignedEncryptedDataElementsTest.java Sat Mar 28 15:39:03 2015
@@ -20,7 +20,6 @@
 package org.apache.wss4j.dom.message;
 
 import java.text.MessageFormat;
-import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.TreeMap;
@@ -29,7 +28,6 @@ import javax.security.auth.callback.Call
 
 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.KeystoreCallbackHandler;
 import org.apache.wss4j.dom.common.SOAPUtil;
@@ -40,6 +38,7 @@ import org.apache.wss4j.common.ext.WSSec
 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.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -350,9 +349,9 @@ public class RequireSignedEncryptedDataE
     }
 
     
-    private List<WSSecurityEngineResult> verify(Document doc, RequestData reqData) throws Exception {
+    private WSHandlerResult verify(Document doc, RequestData reqData) throws Exception {
         Element elem = WSSecurityUtil.getSecurityHeader(doc, null);
-        List<WSSecurityEngineResult> resultList = 
+        WSHandlerResult resultList = 
             secEngine.processSecurityHeader(elem, reqData);
         if (LOG.isDebugEnabled()) {
             String outputString = 

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SKISignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SKISignatureTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SKISignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SKISignatureTest.java Sat Mar 28 15:39:03 2015
@@ -19,19 +19,17 @@
 
 package org.apache.wss4j.dom.message;
 
-import java.util.List;
-
 import org.apache.wss4j.dom.WSSConfig;
 import org.apache.wss4j.dom.WSSecurityEngine;
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.WSSecurityEngineResult;
 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.util.XMLUtils;
 import org.apache.wss4j.dom.str.STRParser.REFERENCE_TYPE;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
 /**
@@ -85,10 +83,10 @@ public class SKISignatureTest extends or
 
         LOG.info("After SigningDSA_SKIDirect....");
         
-        List<WSSecurityEngineResult> results = verify(signedDoc);
+        WSHandlerResult results = verify(signedDoc);
         
         WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
+            results.getActionResults().get(WSConstants.SIGN).get(0);
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE));
         assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_X509_REFERENCE_TYPE));
         REFERENCE_TYPE referenceType = 
@@ -170,7 +168,7 @@ public class SKISignatureTest extends or
      * @param env soap envelope
      * @throws java.lang.Exception Thrown when there is a problem in verification
      */
-    private  List<WSSecurityEngineResult> verify(Document doc) throws Exception {
+    private WSHandlerResult verify(Document doc) throws Exception {
         return secEngine.processSecurityHeader(doc, null, null, crypto);
     }
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java Sat Mar 28 15:39:03 2015
@@ -19,8 +19,6 @@
 
 package org.apache.wss4j.dom.message;
 
-import java.util.List;
-
 import javax.xml.crypto.dsig.SignatureMethod;
 
 import org.apache.wss4j.dom.WSConstants;
@@ -29,6 +27,7 @@ import org.apache.wss4j.dom.WSSecurityEn
 import org.apache.wss4j.dom.common.SecretKeyCallbackHandler;
 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.derivedKey.ConversationConstants;
@@ -124,10 +123,10 @@ public class SecurityContextTokenTest ex
                 LOG.debug(out);
             }
 
-            List<WSSecurityEngineResult> results = verify(doc);
+            WSHandlerResult results = verify(doc);
             
             WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.SCT);
+                results.getActionResults().get(WSConstants.SCT).get(0);
             SecurityContextToken receivedToken = 
                 (SecurityContextToken) actionResult.get(WSSecurityEngineResult.TAG_SECURITY_CONTEXT_TOKEN);
             assertTrue(receivedToken != null);
@@ -174,10 +173,10 @@ public class SecurityContextTokenTest ex
                 LOG.debug(out);
             }
 
-            List<WSSecurityEngineResult> results = verify(doc);
+            WSHandlerResult results = verify(doc);
             
             WSSecurityEngineResult actionResult =
-                WSSecurityUtil.fetchActionResult(results, WSConstants.SCT);
+                results.getActionResults().get(WSConstants.SCT).get(0);
             SecurityContextToken receivedToken = 
                 (SecurityContextToken) actionResult.get(WSSecurityEngineResult.TAG_SECURITY_CONTEXT_TOKEN);
             assertTrue(receivedToken != null);
@@ -370,8 +369,8 @@ public class SecurityContextTokenTest ex
      * @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/message/SignatureAlgorithmSuiteTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java?rev=1669794&r1=1669793&r2=1669794&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java Sat Mar 28 15:39:03 2015
@@ -37,11 +37,11 @@ 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.SOAPUtil;
 import org.apache.wss4j.dom.common.SecretKeyCallbackHandler;
 import org.apache.wss4j.dom.common.SecurityTestUtil;
 import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.apache.xml.security.utils.Base64;
 import org.w3c.dom.Document;
@@ -278,7 +278,7 @@ public class SignatureAlgorithmSuiteTest
         return algorithmSuite;
     }
 
-    private List<WSSecurityEngineResult> verify(
+    private WSHandlerResult verify(
         Element securityHeader, AlgorithmSuite algorithmSuite, Crypto sigVerCrypto
     ) throws Exception {
         WSSecurityEngine secEngine = new WSSecurityEngine();



Mime
View raw message