cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/6] cxf git commit: Remove WebServiceContext from the STS Token providers
Date Thu, 04 Feb 2016 15:32:21 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes b41c6ffd2 -> d8673543d


http://git-wip-us.apache.org/repos/asf/cxf/blob/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerPOPTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerPOPTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerPOPTest.java
index 00d7211..321696a 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerPOPTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerPOPTest.java
@@ -22,14 +22,13 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 import javax.security.auth.callback.CallbackHandler;
-import javax.xml.ws.WebServiceContext;
 
 import org.w3c.dom.Document;
 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;
@@ -114,7 +113,7 @@ public class SAMLTokenRenewerPOPTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -145,8 +144,8 @@ public class SAMLTokenRenewerPOPTest extends org.junit.Assert {
                                 Collections.singletonMap(WSConstants.SIGN, signedResults));
         handlerResults.add(handlerResult);
         
-        WebServiceContext context = validatorParameters.getWebServiceContext();
-        context.getMessageContext().put(WSHandlerConstants.RECV_RESULTS, handlerResults);
+        Map<String, Object> messageContext = validatorParameters.getMessageContext();
+        messageContext.put(WSHandlerConstants.RECV_RESULTS, handlerResults);
 
         // Now successfully renew the token
         TokenRenewerResponse renewerResponse = 
@@ -191,7 +190,7 @@ public class SAMLTokenRenewerPOPTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -222,8 +221,8 @@ public class SAMLTokenRenewerPOPTest extends org.junit.Assert {
                                 Collections.singletonMap(WSConstants.SIGN, signedResults));
         handlerResults.add(handlerResult);
         
-        WebServiceContext context = validatorParameters.getWebServiceContext();
-        context.getMessageContext().put(WSHandlerConstants.RECV_RESULTS, handlerResults);
+        Map<String, Object> messageContext = validatorParameters.getMessageContext();
+        messageContext.put(WSHandlerConstants.RECV_RESULTS, handlerResults);
 
         try {
             samlTokenRenewer.renewToken(renewerParameters);
@@ -247,8 +246,7 @@ public class SAMLTokenRenewerPOPTest 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();
@@ -327,8 +325,7 @@ public class SAMLTokenRenewerPOPTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerRealmTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerRealmTest.java
index 6dd4ca8..c29fd95 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerRealmTest.java
@@ -28,7 +28,6 @@ import javax.security.auth.callback.CallbackHandler;
 import org.w3c.dom.Document;
 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;
@@ -119,7 +118,7 @@ public class SAMLTokenRenewerRealmTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -192,7 +191,7 @@ public class SAMLTokenRenewerRealmTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -235,8 +234,7 @@ public class SAMLTokenRenewerRealmTest 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();
@@ -327,8 +325,7 @@ public class SAMLTokenRenewerRealmTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
index 3b56bf5..c756b11 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewerTest.java
@@ -26,7 +26,6 @@ import javax.security.auth.callback.CallbackHandler;
 import org.w3c.dom.Document;
 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;
@@ -107,7 +106,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -184,7 +183,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -240,7 +239,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -316,7 +315,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -393,7 +392,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -452,7 +451,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -508,7 +507,7 @@ public class SAMLTokenRenewerTest extends org.junit.Assert {
         renewerParameters.setAppliesToAddress("http://dummy-service.com/dummy2");
         renewerParameters.setStsProperties(validatorParameters.getStsProperties());
         renewerParameters.setPrincipal(new CustomTokenPrincipal("alice"));
-        renewerParameters.setWebServiceContext(validatorParameters.getWebServiceContext());
+        renewerParameters.setMessageContext(validatorParameters.getMessageContext());
         renewerParameters.setKeyRequirements(validatorParameters.getKeyRequirements());
         renewerParameters.setTokenRequirements(validatorParameters.getTokenRequirements());
         renewerParameters.setTokenStore(validatorParameters.getTokenStore());
@@ -540,8 +539,7 @@ public class SAMLTokenRenewerTest 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();
@@ -615,8 +613,7 @@ public class SAMLTokenRenewerTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorRealmTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorRealmTest.java
index 98283e9..00cbfef 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorRealmTest.java
@@ -27,7 +27,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 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.rs.security.jose.jwt.JwtConstants;
@@ -190,8 +189,7 @@ public class JWTTokenValidatorRealmTest 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");
         
@@ -226,8 +224,7 @@ public class JWTTokenValidatorRealmTest 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();

http://git-wip-us.apache.org/repos/asf/cxf/blob/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorTest.java
index 13a60b8..03c8bdb 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/JWTTokenValidatorTest.java
@@ -31,7 +31,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 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.rs.security.jose.jwt.JwtClaims;
@@ -338,8 +337,7 @@ public class JWTTokenValidatorTest 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");
         
@@ -374,8 +372,7 @@ public class JWTTokenValidatorTest 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();

http://git-wip-us.apache.org/repos/asf/cxf/blob/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
index 94d4b2d..9c48cda 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
@@ -28,7 +28,6 @@ import javax.security.auth.callback.CallbackHandler;
 import org.w3c.dom.Document;
 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;
@@ -147,8 +146,7 @@ public class SAMLTokenValidatorCachedRealmTest 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();
@@ -219,8 +217,7 @@ public class SAMLTokenValidatorCachedRealmTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
index cab5fa7..8e4b060 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
@@ -28,7 +28,6 @@ import javax.security.auth.callback.CallbackHandler;
 import org.w3c.dom.Document;
 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;
@@ -156,8 +155,7 @@ public class SAMLTokenValidatorRealmTest 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();
@@ -228,8 +226,7 @@ public class SAMLTokenValidatorRealmTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
index b959097..3d80c40 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
@@ -34,7 +34,6 @@ import javax.security.auth.callback.UnsupportedCallbackException;
 
 import org.w3c.dom.Document;
 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;
@@ -486,8 +485,7 @@ public class SAMLTokenValidatorTest 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();
@@ -617,8 +615,7 @@ public class SAMLTokenValidatorTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
index 71886fd..af90113 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.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;
@@ -140,8 +139,7 @@ public class SCTValidatorTest 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();
@@ -173,8 +171,7 @@ public class SCTValidatorTest 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/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
index e215214..8812b4b 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
@@ -27,7 +27,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 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.QNameConstants;
@@ -248,8 +247,7 @@ public class UsernameTokenValidatorTest 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();

http://git-wip-us.apache.org/repos/asf/cxf/blob/da40221a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
index 125db6b..9521e28 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
@@ -24,7 +24,6 @@ import java.util.Properties;
 
 import javax.xml.bind.JAXBElement;
 
-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;
@@ -151,8 +150,7 @@ public class X509TokenValidatorTest 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();

http://git-wip-us.apache.org/repos/asf/cxf/blob/da40221a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
index 87ab54f..81bde90 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
@@ -54,7 +54,7 @@ public class CustomAttributeStatementProvider implements AttributeStatementProvi
             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/da40221a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
index 502fb55..dcfe966 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
@@ -28,7 +28,6 @@ import javax.security.auth.callback.CallbackHandler;
 import org.w3c.dom.Element;
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-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;
@@ -366,8 +365,7 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase
{
         // 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/da40221a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
index fc770a8..1b27208 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
@@ -34,7 +34,6 @@ import org.apache.cxf.binding.soap.SoapBindingConstants;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
-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;
@@ -593,8 +592,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
         // 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(
             "https://localhost:" + STSPORT + "/SecurityTokenService/b-issuer/Transport");


Mime
View raw message