cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: Remove WebServiceContext from the STS Token providers
Date Tue, 02 Feb 2016 15:20:14 GMT
Remove WebServiceContext from the STS Token providers


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cf9ab27a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cf9ab27a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cf9ab27a

Branch: refs/heads/master
Commit: cf9ab27a843df4532d9bd78209aebcafee2ffffc
Parents: 68c201f
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Feb 2 15:19:49 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Feb 2 15:20:07 2016 +0000

----------------------------------------------------------------------
 .../apache/cxf/sts/claims/ClaimsParameters.java | 20 +++++++-------
 .../org/apache/cxf/sts/claims/ClaimsUtils.java  |  2 +-
 .../apache/cxf/sts/event/map/EventMapper.java   | 28 +++++++++-----------
 .../cxf/sts/operation/AbstractOperation.java    |  6 ++---
 .../cxf/sts/operation/TokenCancelOperation.java |  2 +-
 .../cxf/sts/operation/TokenRenewOperation.java  |  4 +--
 .../sts/operation/TokenValidateOperation.java   |  2 +-
 .../cxf/sts/token/canceller/SCTCanceller.java   |  8 +++---
 .../canceller/TokenCancellerParameters.java     | 21 +++++++--------
 .../delegation/TokenDelegationParameters.java   | 21 +++++++--------
 .../sts/token/provider/SAMLTokenProvider.java   |  2 +-
 .../cxf/sts/token/provider/SCTProvider.java     |  2 +-
 .../token/provider/TokenProviderParameters.java | 20 +++++++-------
 .../sts/token/provider/TokenProviderUtils.java  | 13 +++++----
 .../cxf/sts/token/renewer/SAMLTokenRenewer.java |  5 ++--
 .../token/renewer/TokenRenewerParameters.java   | 20 +++++++-------
 .../sts/token/validator/SAMLTokenValidator.java |  2 +-
 .../validator/TokenValidatorParameters.java     | 21 +++++++--------
 .../token/validator/UsernameTokenValidator.java |  2 +-
 .../sts/token/validator/X509TokenValidator.java |  2 +-
 .../claims/mapper/JexlIssueSamlClaimsTest.java  |  3 +--
 .../cxf/sts/operation/CancelSCTUnitTest.java    |  3 +--
 .../cxf/sts/operation/DummyTokenProvider.java   |  2 +-
 .../sts/operation/IssueJWTClaimsUnitTest.java   |  3 +--
 .../operation/IssueJWTOnbehalfofUnitTest.java   |  3 +--
 .../sts/operation/IssueOnbehalfofUnitTest.java  |  3 +--
 .../sts/operation/IssueSamlClaimsUnitTest.java  |  3 +--
 .../cxf/sts/operation/RenewSamlUnitTest.java    |  3 +--
 .../ValidateJWTTransformationTest.java          |  6 ++---
 .../cxf/sts/operation/ValidateJWTUnitTest.java  |  3 +--
 .../cxf/sts/operation/ValidateSCTUnitTest.java  |  3 +--
 .../cxf/sts/operation/ValidateSamlUnitTest.java |  3 +--
 .../ValidateTokenTransformationUnitTest.java    |  3 +--
 .../sts/token/canceller/SCTCancellerTest.java   |  7 ++---
 .../cxf/sts/token/provider/JWTClaimsTest.java   |  4 +--
 .../token/provider/JWTProviderActAsTest.java    |  4 +--
 .../token/provider/JWTProviderLifetimeTest.java |  4 +--
 .../provider/JWTProviderOnBehalfOfTest.java     |  4 +--
 .../provider/JWTTokenProviderRealmTest.java     |  4 +--
 .../token/provider/JWTTokenProviderTest.java    |  4 +--
 .../cxf/sts/token/provider/SAMLClaimsTest.java  |  4 +--
 .../token/provider/SAMLProviderActAsTest.java   |  4 +--
 .../token/provider/SAMLProviderCustomTest.java  |  4 +--
 .../token/provider/SAMLProviderKeyTypeTest.java |  7 ++---
 .../provider/SAMLProviderLifetimeTest.java      |  4 +--
 .../provider/SAMLProviderOnBehalfOfTest.java    |  4 +--
 .../token/provider/SAMLProviderRealmTest.java   |  4 +--
 .../cxf/sts/token/provider/SCTProviderTest.java |  4 +--
 .../renewer/SAMLTokenRenewerLifetimeTest.java   |  7 ++---
 .../token/renewer/SAMLTokenRenewerPOPTest.java  | 21 +++++++--------
 .../renewer/SAMLTokenRenewerRealmTest.java      | 11 +++-----
 .../sts/token/renewer/SAMLTokenRenewerTest.java | 21 +++++++--------
 .../validator/JWTTokenValidatorRealmTest.java   |  7 ++---
 .../token/validator/JWTTokenValidatorTest.java  |  7 ++---
 .../SAMLTokenValidatorCachedRealmTest.java      |  7 ++---
 .../validator/SAMLTokenValidatorRealmTest.java  |  7 ++---
 .../token/validator/SAMLTokenValidatorTest.java |  7 ++---
 .../sts/token/validator/SCTValidatorTest.java   |  7 ++---
 .../validator/UsernameTokenValidatorTest.java   |  4 +--
 .../token/validator/X509TokenValidatorTest.java |  4 +--
 .../CustomAttributeStatementProvider.java       |  2 +-
 .../sts/delegation/SAMLDelegationTest.java      |  4 +--
 .../systest/sts/issueunit/IssueUnitTest.java    |  4 +--
 63 files changed, 166 insertions(+), 264 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParameters.java
index 32b30ea..e3495cc 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParameters.java
@@ -24,8 +24,6 @@ import java.security.Principal;
 import java.util.Map;
 import java.util.Set;
 
-import javax.xml.ws.WebServiceContext;
-
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
 import org.apache.cxf.sts.request.TokenRequirements;
@@ -43,7 +41,7 @@ public class ClaimsParameters {
     private EncryptionProperties encryptionProperties;
     private Principal principal;
     private Set<Principal> roles;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private String appliesToAddress;
@@ -99,14 +97,6 @@ public class ClaimsParameters {
         this.encryptionProperties = encryptionProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -138,6 +128,14 @@ public class ClaimsParameters {
     public String getRealm() {
         return realm;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsUtils.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsUtils.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsUtils.java
index fbd7e1c..19d3298 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsUtils.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsUtils.java
@@ -52,7 +52,7 @@ public final class ClaimsUtils {
             params.setStsProperties(providerParameters.getStsProperties());
             params.setTokenRequirements(providerParameters.getTokenRequirements());
             params.setTokenStore(providerParameters.getTokenStore());
-            params.setWebServiceContext(providerParameters.getWebServiceContext());
+            params.setMessageContext(providerParameters.getMessageContext());
             retrievedClaims = 
                 claimsManager.retrieveClaimValues(
                     providerParameters.getRequestedPrimaryClaims(),

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
index 97cc9e2..6596523 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/event/map/EventMapper.java
@@ -84,12 +84,11 @@ public class EventMapper implements STSEventListener {
     protected void handleEvent(TokenProviderParametersSupport event, Map<String, Object> map) {
         TokenProviderParameters params = event.getTokenParameters();
         try {
-            HttpServletRequest req = (HttpServletRequest)params.getWebServiceContext().getMessageContext()
-                .get(AbstractHTTPDestination.HTTP_REQUEST);
+            HttpServletRequest req = 
+                (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
             map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
             map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-            map.put(KEYS.URL.name(), (String)params.getWebServiceContext().getMessageContext()
-                .get("org.apache.cxf.request.url"));
+            map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
         } catch (Exception ex) {
             map.put(KEYS.REMOTE_HOST.name(), "N.A.");
             map.put(KEYS.REMOTE_PORT.name(), "N.A.");
@@ -133,12 +132,11 @@ public class EventMapper implements STSEventListener {
 
     protected void handleEvent(TokenValidatorParametersSupport event, Map<String, Object> map) {
         TokenValidatorParameters params = event.getTokenParameters();
-        HttpServletRequest req = (HttpServletRequest)params.getWebServiceContext().getMessageContext()
-            .get(AbstractHTTPDestination.HTTP_REQUEST);
+        HttpServletRequest req = 
+            (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getWebServiceContext().getMessageContext()
-            .get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getActAs() != null) {
             map.put(KEYS.VALIDATE_PRINCIPAL.name(), params.getTokenRequirements().getValidateTarget().getPrincipal()
@@ -155,12 +153,11 @@ public class EventMapper implements STSEventListener {
 
     protected void handleEvent(TokenCancellerParametersSupport event, Map<String, Object> map) {
         TokenCancellerParameters params = event.getTokenParameters();
-        HttpServletRequest req = (HttpServletRequest)params.getWebServiceContext().getMessageContext()
-            .get(AbstractHTTPDestination.HTTP_REQUEST);
+        HttpServletRequest req = 
+            (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getWebServiceContext().getMessageContext()
-            .get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getActAs() != null) {
             map.put(KEYS.CANCEL_PRINCIPAL.name(), params.getTokenRequirements().getCancelTarget().getPrincipal()
@@ -176,12 +173,11 @@ public class EventMapper implements STSEventListener {
 
     protected void handleEvent(TokenRenewerParametersSupport event, Map<String, Object> map) {
         TokenRenewerParameters params = event.getTokenParameters();
-        HttpServletRequest req = (HttpServletRequest)params.getWebServiceContext().getMessageContext()
-            .get(AbstractHTTPDestination.HTTP_REQUEST);
+        HttpServletRequest req = 
+            (HttpServletRequest)params.getMessageContext().get(AbstractHTTPDestination.HTTP_REQUEST);
         map.put(KEYS.REMOTE_HOST.name(), req.getRemoteHost());
         map.put(KEYS.REMOTE_PORT.name(), String.valueOf(req.getRemotePort()));
-        map.put(KEYS.URL.name(), (String)params.getWebServiceContext().getMessageContext()
-            .get("org.apache.cxf.request.url"));
+        map.put(KEYS.URL.name(), (String)params.getMessageContext().get("org.apache.cxf.request.url"));
         map.put(KEYS.TOKENTYPE.name(), params.getTokenRequirements().getTokenType());
         if (params.getTokenRequirements().getRenewTarget() != null) {
             map.put(KEYS.RENEW_PRINCIPAL.name(), params.getTokenRequirements().getRenewTarget().getPrincipal()

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
index e801906..b6a827b 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
@@ -388,7 +388,7 @@ public abstract class AbstractOperation {
         TokenProviderParameters providerParameters = new TokenProviderParameters();
         providerParameters.setStsProperties(stsProperties);
         providerParameters.setPrincipal(context.getUserPrincipal());
-        providerParameters.setWebServiceContext(context);
+        providerParameters.setMessageContext(context.getMessageContext());
         providerParameters.setTokenStore(getTokenStore());
         providerParameters.setEncryptToken(encryptIssuedToken);
         
@@ -469,7 +469,7 @@ public abstract class AbstractOperation {
         TokenValidatorParameters validatorParameters = new TokenValidatorParameters();
         validatorParameters.setStsProperties(stsProperties);
         validatorParameters.setPrincipal(context.getUserPrincipal());
-        validatorParameters.setWebServiceContext(context);
+        validatorParameters.setMessageContext(context.getMessageContext());
         validatorParameters.setTokenStore(getTokenStore());
         validatorParameters.setKeyRequirements(null);
         validatorParameters.setTokenRequirements(validateRequirements);
@@ -516,7 +516,7 @@ public abstract class AbstractOperation {
         TokenDelegationParameters delegationParameters = new TokenDelegationParameters();
         delegationParameters.setStsProperties(stsProperties);
         delegationParameters.setPrincipal(context.getUserPrincipal());
-        delegationParameters.setWebServiceContext(context);
+        delegationParameters.setMessageContext(context.getMessageContext());
         delegationParameters.setTokenStore(getTokenStore());
         delegationParameters.setTokenPrincipal(tokenPrincipal);
         delegationParameters.setTokenRoles(tokenRoles);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
index 1194952..1bec1fe 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
@@ -78,7 +78,7 @@ public class TokenCancelOperation extends AbstractOperation implements CancelOpe
             
             cancellerParameters.setStsProperties(stsProperties);
             cancellerParameters.setPrincipal(context.getUserPrincipal());
-            cancellerParameters.setWebServiceContext(context);
+            cancellerParameters.setMessageContext(context.getMessageContext());
             cancellerParameters.setTokenStore(getTokenStore());
             
             cancellerParameters.setKeyRequirements(keyRequirements);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
index f4815f4..312631d 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
@@ -85,7 +85,7 @@ public class TokenRenewOperation extends AbstractOperation implements RenewOpera
             
             renewerParameters.setStsProperties(stsProperties);
             renewerParameters.setPrincipal(context.getUserPrincipal());
-            renewerParameters.setWebServiceContext(context);
+            renewerParameters.setMessageContext(context.getMessageContext());
             renewerParameters.setTokenStore(getTokenStore());
             
             renewerParameters.setKeyRequirements(keyRequirements);
@@ -292,7 +292,7 @@ public class TokenRenewOperation extends AbstractOperation implements RenewOpera
         renewerParameters.setStsProperties(providerParameters.getStsProperties());
         renewerParameters.setTokenRequirements(providerParameters.getTokenRequirements());
         renewerParameters.setTokenStore(providerParameters.getTokenStore());
-        renewerParameters.setWebServiceContext(providerParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(providerParameters.getMessageContext());
         
         return renewerParameters;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
index be8f75e..e84fe2e 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
@@ -77,7 +77,7 @@ public class TokenValidateOperation extends AbstractOperation implements Validat
             
             validatorParameters.setStsProperties(stsProperties);
             validatorParameters.setPrincipal(context.getUserPrincipal());
-            validatorParameters.setWebServiceContext(context);
+            validatorParameters.setMessageContext(context.getMessageContext());
             validatorParameters.setTokenStore(getTokenStore());
             
             //validatorParameters.setKeyRequirements(keyRequirements);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
index 8bd7bbe..795c0a9 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
@@ -22,11 +22,11 @@ package org.apache.cxf.sts.token.canceller;
 import java.security.Key;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.crypto.SecretKey;
-import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Element;
 import org.apache.cxf.common.logging.LogUtils;
@@ -124,7 +124,7 @@ public class SCTCanceller implements TokenCanceller {
     }
     
     private boolean matchKey(TokenCancellerParameters tokenParameters, byte[] secretKey) {
-        MessageContext messageContext = tokenParameters.getWebServiceContext().getMessageContext();
+        Map<String, Object> messageContext = tokenParameters.getMessageContext();
 
         if (matchDOMSignatureSecret(messageContext, secretKey)) {
             return true;
@@ -150,7 +150,7 @@ public class SCTCanceller implements TokenCanceller {
     }
     
     private boolean matchDOMSignatureSecret(
-        MessageContext messageContext, byte[] secretToMatch
+        Map<String, Object> messageContext, byte[] secretToMatch
     ) {
         final List<WSHandlerResult> handlerResults = 
             CastUtils.cast((List<?>) messageContext.get(WSHandlerConstants.RECV_RESULTS));
@@ -179,7 +179,7 @@ public class SCTCanceller implements TokenCanceller {
     }
     
     private boolean matchStreamingSignatureSecret(
-        MessageContext messageContext, byte[] secretToMatch
+        Map<String, Object> messageContext, byte[] secretToMatch
     ) throws XMLSecurityException {
         @SuppressWarnings("unchecked")
         final List<SecurityEvent> incomingEventList = 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
index 76af002..5fe83f7 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
@@ -20,8 +20,7 @@
 package org.apache.cxf.sts.token.canceller;
 
 import java.security.Principal;
-
-import javax.xml.ws.WebServiceContext;
+import java.util.Map;
 
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
@@ -38,7 +37,7 @@ public class TokenCancellerParameters {
 
     private STSPropertiesMBean stsProperties;
     private Principal principal;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private TokenStore tokenStore;
@@ -84,14 +83,6 @@ public class TokenCancellerParameters {
         this.stsProperties = stsProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -99,5 +90,13 @@ public class TokenCancellerParameters {
     public Principal getPrincipal() {
         return principal;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/TokenDelegationParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/TokenDelegationParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/TokenDelegationParameters.java
index 1c07d74..ed846dc 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/TokenDelegationParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/TokenDelegationParameters.java
@@ -20,10 +20,9 @@
 package org.apache.cxf.sts.token.delegation;
 
 import java.security.Principal;
+import java.util.Map;
 import java.util.Set;
 
-import javax.xml.ws.WebServiceContext;
-
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
 import org.apache.cxf.sts.request.ReceivedToken;
@@ -39,7 +38,7 @@ public class TokenDelegationParameters {
 
     private STSPropertiesMBean stsProperties;
     private Principal principal;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private TokenStore tokenStore;
@@ -88,14 +87,6 @@ public class TokenDelegationParameters {
         this.stsProperties = stsProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -127,5 +118,13 @@ public class TokenDelegationParameters {
     public void setTokenRoles(Set<Principal> tokenRoles) {
         this.tokenRoles = tokenRoles;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
index ad6b386..867f150 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
@@ -151,7 +151,7 @@ public class SAMLTokenProvider extends AbstractSAMLTokenProvider implements Toke
                                                         tokenParameters.getStsProperties(), 
                                                         tokenParameters.getEncryptionProperties(), 
                                                         keyRequirements,
-                                                        tokenParameters.getWebServiceContext());
+                                                        tokenParameters.getMessageContext());
             }
             response.setToken(token);
             

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
index 93f3a08..6ddf54a 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
@@ -180,7 +180,7 @@ public class SCTProvider implements TokenProvider {
                                                         tokenParameters.getStsProperties(), 
                                                         tokenParameters.getEncryptionProperties(), 
                                                         tokenParameters.getKeyRequirements(),
-                                                        tokenParameters.getWebServiceContext());
+                                                        tokenParameters.getMessageContext());
                 response.setToken(el);
             } else {
                 response.setToken(sct.getElement());

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderParameters.java
index aeb5798..88893a3 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderParameters.java
@@ -22,8 +22,6 @@ package org.apache.cxf.sts.token.provider;
 import java.security.Principal;
 import java.util.Map;
 
-import javax.xml.ws.WebServiceContext;
-
 import org.apache.cxf.rt.security.claims.ClaimCollection;
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.claims.ClaimsManager;
@@ -42,7 +40,7 @@ public class TokenProviderParameters {
     private STSPropertiesMBean stsProperties;
     private EncryptionProperties encryptionProperties;
     private Principal principal;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private ClaimCollection requestedPrimaryClaims;
     private ClaimCollection requestedSecondaryClaims;
     private KeyRequirements keyRequirements;
@@ -110,14 +108,6 @@ public class TokenProviderParameters {
         this.encryptionProperties = encryptionProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -165,5 +155,13 @@ public class TokenProviderParameters {
     public void setEncryptToken(boolean encryptToken) {
         this.encryptToken = encryptToken;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderUtils.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderUtils.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderUtils.java
index b25d7a2..c0794a1 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderUtils.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderUtils.java
@@ -21,13 +21,12 @@ package org.apache.cxf.sts.token.provider;
 import java.security.cert.X509Certificate;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.xml.bind.JAXBElement;
 import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -108,7 +107,7 @@ public final class TokenProviderUtils {
         STSPropertiesMBean stsProperties,
         EncryptionProperties encryptionProperties,
         KeyRequirements keyRequirements,
-        WebServiceContext context
+        Map<String, Object> messageContext
     ) throws WSSecurityException {
         String name = encryptionProperties.getEncryptionName();
         if (name == null) {
@@ -152,7 +151,7 @@ public final class TokenProviderUtils {
         
         WSSecEncrypt builder = new WSSecEncrypt();
         if (WSHandlerConstants.USE_REQ_SIG_CERT.equals(name)) {
-            X509Certificate cert = getReqSigCert(context.getMessageContext());
+            X509Certificate cert = getReqSigCert(messageContext);
             builder.setUseThisCert(cert);
         } else {
             builder.setUserInfo(name);
@@ -178,10 +177,10 @@ public final class TokenProviderUtils {
      * Get the X509Certificate associated with the signature that was received. This cert is to be used
      * for encrypting the issued token.
      */
-    public static X509Certificate getReqSigCert(MessageContext context) {
+    public static X509Certificate getReqSigCert(Map<String, Object> messageContext) {
         @SuppressWarnings("unchecked")
         List<WSHandlerResult> results = 
-            (List<WSHandlerResult>) context.get(WSHandlerConstants.RECV_RESULTS);
+            (List<WSHandlerResult>) messageContext.get(WSHandlerConstants.RECV_RESULTS);
         // DOM
         X509Certificate cert = WSS4JUtils.getReqSigCert(results);
         if (cert != null) {
@@ -191,7 +190,7 @@ public final class TokenProviderUtils {
         // Streaming
         @SuppressWarnings("unchecked")
         final List<SecurityEvent> incomingEventList = 
-            (List<SecurityEvent>) context.get(SecurityEvent.class.getName() + ".in");
+            (List<SecurityEvent>) messageContext.get(SecurityEvent.class.getName() + ".in");
         if (incomingEventList != null) {
             for (SecurityEvent incomingEvent : incomingEventList) {
                 if (WSSecurityEventConstants.SIGNED_PART == incomingEvent.getSecurityEventType()

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
index 5075946..0fe906d 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
@@ -31,7 +31,6 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.security.auth.callback.CallbackHandler;
-import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -479,7 +478,7 @@ public class SAMLTokenRenewer extends AbstractSAMLTokenProvider implements Token
         providerParameters.setStsProperties(renewerParameters.getStsProperties());
         providerParameters.setTokenRequirements(renewerParameters.getTokenRequirements());
         providerParameters.setTokenStore(renewerParameters.getTokenStore());
-        providerParameters.setWebServiceContext(renewerParameters.getWebServiceContext());
+        providerParameters.setMessageContext(renewerParameters.getMessageContext());
         
         // Store token to renew in the additional properties in case you want to base some
         // Conditions on the token
@@ -549,7 +548,7 @@ public class SAMLTokenRenewer extends AbstractSAMLTokenProvider implements Token
             TokenRenewerParameters tokenParameters,
             SAMLKeyInfo subjectKeyInfo
         ) {
-            MessageContext messageContext = tokenParameters.getWebServiceContext().getMessageContext();
+            Map<String, Object> messageContext = tokenParameters.getMessageContext();
             final List<WSHandlerResult> handlerResults = 
                 CastUtils.cast((List<?>) messageContext.get(WSHandlerConstants.RECV_RESULTS));
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/TokenRenewerParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/TokenRenewerParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/TokenRenewerParameters.java
index 0c697ab..cd9cf3d 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/TokenRenewerParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/TokenRenewerParameters.java
@@ -22,8 +22,6 @@ package org.apache.cxf.sts.token.renewer;
 import java.security.Principal;
 import java.util.Map;
 
-import javax.xml.ws.WebServiceContext;
-
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
 import org.apache.cxf.sts.request.ReceivedToken;
@@ -41,7 +39,7 @@ public class TokenRenewerParameters {
     private STSPropertiesMBean stsProperties;
     private EncryptionProperties encryptionProperties;
     private Principal principal;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private String appliesToAddress;
@@ -107,14 +105,6 @@ public class TokenRenewerParameters {
         this.encryptionProperties = encryptionProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -138,5 +128,13 @@ public class TokenRenewerParameters {
     public String getRealm() {
         return realm;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
index abb1303..7ac6650 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
@@ -163,7 +163,7 @@ public class SAMLTokenValidator implements TokenValidator {
             WSSConfig wssConfig = WSSConfig.getNewInstance();
             requestData.setWssConfig(wssConfig);
             requestData.setCallbackHandler(callbackHandler);
-            requestData.setMsgContext(tokenParameters.getWebServiceContext().getMessageContext());
+            requestData.setMsgContext(tokenParameters.getMessageContext());
             requestData.setSubjectCertConstraints(certConstraints.getCompiledSubjectContraints());
 
             WSDocInfo docInfo = new WSDocInfo(validateTargetElement.getOwnerDocument());

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/TokenValidatorParameters.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/TokenValidatorParameters.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/TokenValidatorParameters.java
index 1127e83..8c0c7bd 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/TokenValidatorParameters.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/TokenValidatorParameters.java
@@ -20,8 +20,7 @@
 package org.apache.cxf.sts.token.validator;
 
 import java.security.Principal;
-
-import javax.xml.ws.WebServiceContext;
+import java.util.Map;
 
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
@@ -38,7 +37,7 @@ public class TokenValidatorParameters {
 
     private STSPropertiesMBean stsProperties;
     private Principal principal;
-    private WebServiceContext webServiceContext;
+    private Map<String, Object> messageContext;
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private TokenStore tokenStore;
@@ -85,14 +84,6 @@ public class TokenValidatorParameters {
         this.stsProperties = stsProperties;
     }
     
-    public WebServiceContext getWebServiceContext() {
-        return webServiceContext;
-    }
-
-    public void setWebServiceContext(WebServiceContext webServiceContext) {
-        this.webServiceContext = webServiceContext;
-    }
-    
     public void setPrincipal(Principal principal) {
         this.principal = principal;
     }
@@ -108,5 +99,13 @@ public class TokenValidatorParameters {
     public String getRealm() {
         return realm;
     }
+
+    public Map<String, Object> getMessageContext() {
+        return messageContext;
+    }
+
+    public void setMessageContext(Map<String, Object> messageContext) {
+        this.messageContext = messageContext;
+    }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
index c376cda..cbbd573 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
@@ -119,7 +119,7 @@ public class UsernameTokenValidator implements TokenValidator {
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         requestData.setWssConfig(wssConfig);
         requestData.setCallbackHandler(callbackHandler);
-        requestData.setMsgContext(tokenParameters.getWebServiceContext().getMessageContext());
+        requestData.setMsgContext(tokenParameters.getMessageContext());
         
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
index 278d975..276d3fd 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
@@ -120,7 +120,7 @@ public class X509TokenValidator implements TokenValidator {
         requestData.setSigVerCrypto(sigCrypto);
         requestData.setWssConfig(WSSConfig.getNewInstance());
         requestData.setCallbackHandler(callbackHandler);
-        requestData.setMsgContext(tokenParameters.getWebServiceContext().getMessageContext());
+        requestData.setMsgContext(tokenParameters.getMessageContext());
         requestData.setSubjectCertConstraints(certConstraints.getCompiledSubjectContraints());
 
         TokenValidatorResponse response = new TokenValidatorResponse();

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/claims/mapper/JexlIssueSamlClaimsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/claims/mapper/JexlIssueSamlClaimsTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/claims/mapper/JexlIssueSamlClaimsTest.java
index 219f3f9..f81927b 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/claims/mapper/JexlIssueSamlClaimsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/claims/mapper/JexlIssueSamlClaimsTest.java
@@ -377,8 +377,7 @@ public class JexlIssueSamlClaimsTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CancelSCTUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CancelSCTUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CancelSCTUnitTest.java
index f8dc0cf..ce23cee 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CancelSCTUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CancelSCTUnitTest.java
@@ -206,8 +206,7 @@ public class CancelSCTUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
index b8d590f..98a09a4 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
@@ -71,7 +71,7 @@ public class DummyTokenProvider implements TokenProvider {
                                                         tokenParameters.getStsProperties(), 
                                                         tokenParameters.getEncryptionProperties(), 
                                                         tokenParameters.getKeyRequirements(),
-                                                        tokenParameters.getWebServiceContext());
+                                                        tokenParameters.getMessageContext());
                 response.setToken(el);
             } else {
                 response.setToken(bst.getElement());

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTClaimsUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTClaimsUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTClaimsUnitTest.java
index 82d921b..3dd8372 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTClaimsUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTClaimsUnitTest.java
@@ -747,8 +747,7 @@ public class IssueJWTClaimsUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTOnbehalfofUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTOnbehalfofUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTOnbehalfofUnitTest.java
index 5d1bfa6..4f16544 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTOnbehalfofUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueJWTOnbehalfofUnitTest.java
@@ -439,8 +439,7 @@ public class IssueJWTOnbehalfofUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueOnbehalfofUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueOnbehalfofUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueOnbehalfofUnitTest.java
index 65380cd..510c7b4 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueOnbehalfofUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueOnbehalfofUnitTest.java
@@ -1269,8 +1269,7 @@ public class IssueOnbehalfofUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlClaimsUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlClaimsUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlClaimsUnitTest.java
index d519348..459a78f 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlClaimsUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlClaimsUnitTest.java
@@ -951,8 +951,7 @@ public class IssueSamlClaimsUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/RenewSamlUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/RenewSamlUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/RenewSamlUnitTest.java
index 1d50ff8..3da66d4 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/RenewSamlUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/RenewSamlUnitTest.java
@@ -537,8 +537,7 @@ public class RenewSamlUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTTransformationTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTTransformationTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTTransformationTest.java
index 9caf7b0..54f9b9a 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTTransformationTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTTransformationTest.java
@@ -383,8 +383,7 @@ public class ValidateJWTTransformationTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         
@@ -524,8 +523,7 @@ public class ValidateJWTTransformationTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTUnitTest.java
index f44a06d..0c520e3 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateJWTUnitTest.java
@@ -203,8 +203,7 @@ public class ValidateJWTUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSCTUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSCTUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSCTUnitTest.java
index d17404b..0d0bd77 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSCTUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSCTUnitTest.java
@@ -213,8 +213,7 @@ public class ValidateSCTUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSamlUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSamlUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSamlUnitTest.java
index 53ade10..faf5d47 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSamlUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateSamlUnitTest.java
@@ -268,8 +268,7 @@ public class ValidateSamlUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateTokenTransformationUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateTokenTransformationUnitTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateTokenTransformationUnitTest.java
index 8ff98c5..9853ec2 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateTokenTransformationUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/ValidateTokenTransformationUnitTest.java
@@ -892,8 +892,7 @@ public class ValidateTokenTransformationUnitTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
index 6afed6a..3d221b6 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
@@ -23,7 +23,6 @@ import java.util.Properties;
 import org.w3c.dom.Document;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -130,8 +129,7 @@ public class SCTCancellerTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         // Add STSProperties object
         StaticSTSProperties stsProperties = new StaticSTSProperties();
@@ -163,8 +161,7 @@ public class SCTCancellerTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTClaimsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTClaimsTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTClaimsTest.java
index b735f3a..1cf7dde 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTClaimsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTClaimsTest.java
@@ -24,7 +24,6 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
@@ -228,8 +227,7 @@ public class JWTClaimsTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         if (appliesTo != null) {
             parameters.setAppliesToAddress(appliesTo);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderActAsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderActAsTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderActAsTest.java
index 9e0fcd6..9d39600 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderActAsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderActAsTest.java
@@ -24,7 +24,6 @@ import javax.xml.bind.JAXBElement;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
@@ -161,8 +160,7 @@ public class JWTProviderActAsTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderLifetimeTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderLifetimeTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderLifetimeTest.java
index 3d16d40..a9a3df6 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderLifetimeTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderLifetimeTest.java
@@ -21,7 +21,6 @@ package org.apache.cxf.sts.token.provider;
 import java.util.Date;
 import java.util.Properties;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
@@ -372,8 +371,7 @@ public class JWTProviderLifetimeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderOnBehalfOfTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderOnBehalfOfTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderOnBehalfOfTest.java
index 265b48c..537f8d7 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderOnBehalfOfTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTProviderOnBehalfOfTest.java
@@ -24,7 +24,6 @@ import javax.xml.bind.JAXBElement;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
@@ -161,8 +160,7 @@ public class JWTProviderOnBehalfOfTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderRealmTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderRealmTest.java
index 2a747c1..3e39b35 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderRealmTest.java
@@ -22,7 +22,6 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
@@ -119,8 +118,7 @@ public class JWTTokenProviderRealmTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderTest.java
index f49e6eb..f44bb1a 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/JWTTokenProviderTest.java
@@ -24,7 +24,6 @@ import java.security.cert.X509Certificate;
 import java.util.Arrays;
 import java.util.Properties;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
@@ -372,8 +371,7 @@ public class JWTTokenProviderTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLClaimsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLClaimsTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLClaimsTest.java
index f4d292b..9f9b0bc 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLClaimsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLClaimsTest.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import java.util.Properties;
 
 import org.w3c.dom.Element;
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.rt.security.claims.Claim;
@@ -414,8 +413,7 @@ public class SAMLClaimsTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         if (appliesTo != null) {
             parameters.setAppliesToAddress(appliesTo);

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
index b032602..d106933 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
@@ -25,7 +25,6 @@ import java.util.Properties;
 import javax.xml.bind.JAXBElement;
 
 import org.w3c.dom.Element;
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.QNameConstants;
@@ -211,8 +210,7 @@ public class SAMLProviderActAsTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderCustomTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderCustomTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderCustomTest.java
index 9ead280..7df9e7c 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderCustomTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderCustomTest.java
@@ -24,7 +24,6 @@ import java.util.Properties;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -288,8 +287,7 @@ public class SAMLProviderCustomTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderKeyTypeTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderKeyTypeTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderKeyTypeTest.java
index ec90777..4c3a01d 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderKeyTypeTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderKeyTypeTest.java
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.Properties;
 
 import org.w3c.dom.Element;
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -619,8 +618,7 @@ public class SAMLProviderKeyTypeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         
@@ -657,8 +655,7 @@ public class SAMLProviderKeyTypeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderLifetimeTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderLifetimeTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderLifetimeTest.java
index e186afa..d39cd49 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderLifetimeTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderLifetimeTest.java
@@ -23,7 +23,6 @@ import java.util.Properties;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -381,8 +380,7 @@ public class SAMLProviderLifetimeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
index 20a690c..c5c0c13 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
@@ -26,7 +26,6 @@ import javax.xml.bind.JAXBElement;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.QNameConstants;
@@ -214,8 +213,7 @@ public class SAMLProviderOnBehalfOfTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderRealmTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderRealmTest.java
index 81a763c..a4fe877 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderRealmTest.java
@@ -24,7 +24,6 @@ import java.util.Properties;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -186,8 +185,7 @@ public class SAMLProviderRealmTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SCTProviderTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SCTProviderTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SCTProviderTest.java
index 658d24b..9caa436 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SCTProviderTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SCTProviderTest.java
@@ -22,7 +22,6 @@ import java.util.Properties;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.StaticSTSProperties;
@@ -182,8 +181,7 @@ public class SCTProviderTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
         
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf9ab27a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerLifetimeTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerLifetimeTest.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerLifetimeTest.java
index 34a419b..1ee12c4 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerLifetimeTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerLifetimeTest.java
@@ -25,7 +25,6 @@ import javax.security.auth.callback.CallbackHandler;
 
 import org.w3c.dom.Element;
 
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.sts.STSConstants;
@@ -328,8 +327,7 @@ public class SAMLTokenRenewerLifetimeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 
@@ -408,8 +406,7 @@ public class SAMLTokenRenewerLifetimeTest extends org.junit.Assert {
         // Mock up message context
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg);
-        WebServiceContextImpl webServiceContext = new WebServiceContextImpl(msgCtx);
-        parameters.setWebServiceContext(webServiceContext);
+        parameters.setMessageContext(msgCtx);
 
         parameters.setAppliesToAddress("http://dummy-service.com/dummy");
 


Mime
View raw message