cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: "setContextualProperty" doesn't make any sense as a property has to have a context to where it's set. put the property on the message. Add javadoc to resetContextCache.
Date Mon, 26 Jan 2015 20:58:48 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c72cac8cb -> fe611ce66


"setContextualProperty" doesn't make any sense as a property has to have a context to where
it's set.  put the property on the message.  Add javadoc to resetContextCache.


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

Branch: refs/heads/master
Commit: fe611ce66d8d2b82cba0b48c3e9f5406da8b38ed
Parents: c72cac8
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Jan 26 15:24:33 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Jan 26 15:24:33 2015 -0500

----------------------------------------------------------------------
 .../cxf/message/AbstractWrappedMessage.java     | 11 ++++++--
 .../org/apache/cxf/message/ExchangeImpl.java    | 29 ++++++++++++--------
 .../java/org/apache/cxf/message/Message.java    |  5 +++-
 .../org/apache/cxf/message/MessageImpl.java     |  2 +-
 .../cxf/jaxws/JAXWSMethodInvokerTest.java       |  4 +--
 .../ws/addressing/impl/MAPAggregatorTest.java   |  4 +--
 .../SecureConversationInInterceptor.java        |  2 +-
 .../cxf/ws/security/trust/STSLoginModule.java   |  2 +-
 .../wss4j/AbstractWSS4JInterceptor.java         | 16 +++++------
 .../wss4j/PolicyBasedWSS4JOutInterceptor.java   |  2 +-
 .../policyhandlers/AbstractBindingBuilder.java  |  4 +--
 .../AsymmetricBindingHandler.java               |  2 +-
 .../policyhandlers/TransportBindingHandler.java |  2 +-
 .../wss4j/saml/PolicyBasedSamlTest.java         |  4 +--
 .../cxf/systest/jaxws/LocatorServiceImpl.java   |  2 +-
 .../security/saml/SamlRetrievalInterceptor.java |  2 +-
 .../ws/rm/RobustServiceWithFaultTest.java       |  2 +-
 17 files changed, 55 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/core/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java b/core/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
index 03ce0f7..496b97b 100644
--- a/core/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
+++ b/core/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
@@ -161,8 +161,15 @@ public abstract class AbstractWrappedMessage implements Message {
     public Object getContextualProperty(String key) {
         return message.getContextualProperty(key);
     }  
-    public void setContextualProperty(String key, Object v) {
-        message.setContextualProperty(key, v);
+    void setContextualProperty(String key, Object v) {
+        if (message instanceof MessageImpl) {
+            ((MessageImpl)message).setContextualProperty(key, v);
+        }  else if (message instanceof AbstractWrappedMessage) {
+            ((AbstractWrappedMessage)message).setContextualProperty(key, v);
+        } else {
+            //cannot set directly.  Just invalidate the cache.
+            message.resetContextCache();
+        }        
     }
     
     public Set<String> getContextualPropertyKeys() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java b/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
index 5ac10ca..2e53fae 100644
--- a/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
+++ b/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
@@ -113,24 +113,29 @@ public class ExchangeImpl extends ConcurrentHashMap<String, Object>
 implements
     }
     
     public Object put(String key, Object value) {
-        if (inMessage != null) {
-            inMessage.setContextualProperty(key, value);
-        }
-        if (outMessage != null) {
-            outMessage.setContextualProperty(key, value);
-        }
-        if (inFaultMessage != null) {
-            inFaultMessage.setContextualProperty(key, value);
-        }
-        if (outFaultMessage != null) {
-            outFaultMessage.setContextualProperty(key, value);
-        }
+        setMessageContextProperty(inMessage, key, value);
+        setMessageContextProperty(outMessage, key, value);
+        setMessageContextProperty(inFaultMessage, key, value);
+        setMessageContextProperty(outFaultMessage, key, value);
         if (value == null) {
             return super.remove(key);
         }
         return super.put(key, value);
     }
 
+    private void setMessageContextProperty(Message m, String key, Object value) {
+        if (m == null) {
+            return;
+        }
+        if (m instanceof MessageImpl) {
+            ((MessageImpl)m).setContextualProperty(key, value);
+        }  else if (m instanceof AbstractWrappedMessage) {
+            ((AbstractWrappedMessage)m).setContextualProperty(key, value);
+        } else {
+            //cannot set directly.  Just invalidate the cache.
+            m.resetContextCache();
+        }
+    }
     
     public Destination getDestination() {
         return destination;

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/core/src/main/java/org/apache/cxf/message/Message.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/Message.java b/core/src/main/java/org/apache/cxf/message/Message.java
index 39d6c96..0695b50 100644
--- a/core/src/main/java/org/apache/cxf/message/Message.java
+++ b/core/src/main/java/org/apache/cxf/message/Message.java
@@ -248,8 +248,11 @@ public interface Message extends StringMap {
      */
     Object getContextualProperty(String key);   
     
+    /**
+     * Resets the cache of contextual properties that messages may contain.  Subsequent
+     * calls to getContextualProperty will likely recalculate the cache.
+     */
     void resetContextCache();
-    void setContextualProperty(String key, Object v);
     
     /**
      * @return set of defined contextual property keys

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/core/src/main/java/org/apache/cxf/message/MessageImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/MessageImpl.java b/core/src/main/java/org/apache/cxf/message/MessageImpl.java
index 94ba52b..b08b0c5 100644
--- a/core/src/main/java/org/apache/cxf/message/MessageImpl.java
+++ b/core/src/main/java/org/apache/cxf/message/MessageImpl.java
@@ -225,7 +225,7 @@ public class MessageImpl extends StringMapImpl implements Message {
         }
     }
 
-    public void setContextualProperty(String key, Object v) {
+    void setContextualProperty(String key, Object v) {
         if (contextCache != null && !containsKey(key)) {
             contextCache.put(key, v);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JAXWSMethodInvokerTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JAXWSMethodInvokerTest.java
b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JAXWSMethodInvokerTest.java
index 50be869..06c5be1 100644
--- a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JAXWSMethodInvokerTest.java
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JAXWSMethodInvokerTest.java
@@ -184,7 +184,7 @@ public class JAXWSMethodInvokerTest extends Assert {
         // request-response with null response, interpretNullAsOneway disabled
         ex.setOneWay(false);
         serviceObject.setNullable(true);
-        inMessage.setContextualProperty("jaxws.provider.interpretNullAsOneway", Boolean.FALSE);
+        inMessage.put("jaxws.provider.interpretNullAsOneway", Boolean.FALSE);
         obj = (MessageContentsList)jaxwsMethodInvoker.invoke(
             ex, new MessageContentsList(new Object[]{new StreamSource()}));
         assertEquals(1, obj.size());
@@ -195,7 +195,7 @@ public class JAXWSMethodInvokerTest extends Assert {
         // request-response with null response, interpretNullAsOneway explicitly enabled
         ex.setOneWay(false);
         serviceObject.setNullable(true);
-        inMessage.setContextualProperty("jaxws.provider.interpretNullAsOneway", Boolean.TRUE);
+        inMessage.put("jaxws.provider.interpretNullAsOneway", Boolean.TRUE);
         obj = (MessageContentsList)jaxwsMethodInvoker
             .invoke(ex, new MessageContentsList(new Object[]{new StreamSource()}));
         assertNull(obj);

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorTest.java
b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorTest.java
index 95c612b..248dd4b 100644
--- a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorTest.java
+++ b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorTest.java
@@ -496,8 +496,8 @@ public class MAPAggregatorTest extends Assert {
                              REQUESTOR_ROLE,
                              Boolean.TRUE);
         message.getContextualProperty(WSAContextUtils.REPLYTO_PROPERTY);
-        message.setContextualProperty(WSAContextUtils.REPLYTO_PROPERTY, localReplyTo);
-        message.setContextualProperty(WSAContextUtils.DECOUPLED_ENDPOINT_BASE_PROPERTY, decoupledEndpointBase);
+        message.put(WSAContextUtils.REPLYTO_PROPERTY, localReplyTo);
+        message.put(WSAContextUtils.DECOUPLED_ENDPOINT_BASE_PROPERTY, decoupledEndpointBase);
         
         AddressingProperties maps = new AddressingProperties();
         AttributedURIType id = 

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
index d17bdd0..6cb52d1 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
@@ -513,7 +513,7 @@ class SecureConversationInInterceptor extends AbstractPhaseInterceptor<SoapMessa
                     
                     client.cancelSecurityToken(tok);
                     NegotiationUtils.getTokenStore(m2).remove(tok.getId());
-                    m2.setContextualProperty(SecurityConstants.TOKEN, null);
+                    m2.put(SecurityConstants.TOKEN, null);
                 } catch (RuntimeException e) {
                     throw e;
                 } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
index e6bb31d..d141b6b 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSLoginModule.java
@@ -242,7 +242,7 @@ public class STSLoginModule implements LoginModule {
             
             STSClient stsClient = configureSTSClient(message);
             if (message != null) {
-                message.setContextualProperty(SecurityConstants.STS_CLIENT, stsClient);
+                message.put(SecurityConstants.STS_CLIENT, stsClient);
                 data.setMsgContext(message);
             } else {
                 TokenStore tokenStore = configureTokenStore(message);

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
index ed97f3f..10d731c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
@@ -155,34 +155,34 @@ public abstract class AbstractWSS4JInterceptor extends WSHandler implements
Soap
     protected void translateProperties(SoapMessage msg) {
         String bspCompliant = (String)msg.getContextualProperty(SecurityConstants.IS_BSP_COMPLIANT);
         if (bspCompliant != null) {
-            msg.setContextualProperty(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
+            msg.put(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
         }
         String futureTTL = 
             (String)msg.getContextualProperty(SecurityConstants.TIMESTAMP_FUTURE_TTL);
         if (futureTTL != null) {
-            msg.setContextualProperty(WSHandlerConstants.TTL_FUTURE_TIMESTAMP, futureTTL);
+            msg.put(WSHandlerConstants.TTL_FUTURE_TIMESTAMP, futureTTL);
         }
         String ttl = 
                 (String)msg.getContextualProperty(SecurityConstants.TIMESTAMP_TTL);
         if (ttl != null) {
-            msg.setContextualProperty(WSHandlerConstants.TTL_TIMESTAMP, ttl);
+            msg.put(WSHandlerConstants.TTL_TIMESTAMP, ttl);
         }
         
         String utFutureTTL = 
             (String)msg.getContextualProperty(SecurityConstants.USERNAMETOKEN_FUTURE_TTL);
         if (utFutureTTL != null) {
-            msg.setContextualProperty(WSHandlerConstants.TTL_FUTURE_USERNAMETOKEN, utFutureTTL);
+            msg.put(WSHandlerConstants.TTL_FUTURE_USERNAMETOKEN, utFutureTTL);
         }
         String utTTL = 
             (String)msg.getContextualProperty(SecurityConstants.USERNAMETOKEN_TTL);
         if (utTTL != null) {
-            msg.setContextualProperty(WSHandlerConstants.TTL_USERNAMETOKEN, utTTL);
+            msg.put(WSHandlerConstants.TTL_USERNAMETOKEN, utTTL);
         }
         
         String certConstraints = 
             (String)msg.getContextualProperty(SecurityConstants.SUBJECT_CERT_CONSTRAINTS);
         if (certConstraints != null) {
-            msg.setContextualProperty(WSHandlerConstants.SIG_SUBJECT_CERT_CONSTRAINTS, certConstraints);
+            msg.put(WSHandlerConstants.SIG_SUBJECT_CERT_CONSTRAINTS, certConstraints);
         }
         
         // Now set SAML SenderVouches + Holder Of Key requirements
@@ -190,7 +190,7 @@ public abstract class AbstractWSS4JInterceptor extends WSHandler implements
Soap
             MessageUtils.getContextualBoolean(
                 msg, SecurityConstants.VALIDATE_SAML_SUBJECT_CONFIRMATION, true
             );
-        msg.setContextualProperty(
+        msg.put(
             WSHandlerConstants.VALIDATE_SAML_SUBJECT_CONFIRMATION, 
             Boolean.toString(validateSAMLSubjectConf)
         );
@@ -198,7 +198,7 @@ public abstract class AbstractWSS4JInterceptor extends WSHandler implements
Soap
         PasswordEncryptor passwordEncryptor = 
             (PasswordEncryptor)msg.getContextualProperty(SecurityConstants.PASSWORD_ENCRYPTOR_INSTANCE);
         if (passwordEncryptor != null) {
-            msg.setContextualProperty(ConfigurationConstants.PASSWORD_ENCRYPTOR_INSTANCE,
passwordEncryptor);
+            msg.put(ConfigurationConstants.PASSWORD_ENCRYPTOR_INSTANCE, passwordEncryptor);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
index 8d0a438..dfb3597 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
@@ -238,7 +238,7 @@ public class PolicyBasedWSS4JOutInterceptor extends AbstractPhaseInterceptor<Soa
         private void translateProperties(SoapMessage msg) {
             String bspCompliant = (String)msg.getContextualProperty(SecurityConstants.IS_BSP_COMPLIANT);
             if (bspCompliant != null) {
-                msg.setContextualProperty(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
+                msg.put(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
             }
         }
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index a697e41..f2a13d0 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -894,7 +894,7 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
         }
         secToken.setToken(assertion.getElement());
         getTokenStore().add(secToken);
-        message.setContextualProperty(SecurityConstants.TOKEN_ID, secToken.getId());
+        message.put(SecurityConstants.TOKEN_ID, secToken.getId());
     }
     
     protected String findIDFromSamlToken(Element samlToken) {
@@ -944,7 +944,7 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
             try {
                 handler = (CallbackHandler)ClassLoaderUtils
                     .loadClass((String)o, this.getClass()).newInstance();
-                message.setContextualProperty(SecurityConstants.CALLBACK_HANDLER, handler);
+                message.put(SecurityConstants.CALLBACK_HANDLER, handler);
             } catch (Exception e) {
                 handler = null;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index 36f7aba..8329647 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -832,7 +832,7 @@ public class AsymmetricBindingHandler extends AbstractBindingBuilder {
                     }
                     
                     getTokenStore().add(tempTok);
-                    message.setContextualProperty(SecurityConstants.TOKEN_ID, tempTok.getId());
+                    message.put(SecurityConstants.TOKEN_ID, tempTok.getId());
                     
                     return id;
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
index 5947969..113e507 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
@@ -339,7 +339,7 @@ public class TransportBindingHandler extends AbstractBindingBuilder {
                 new SecurityToken(id, usernameToken.getUsernameTokenElement(), created, expires);
             tempTok.setSecret(secret);
             getTokenStore().add(tempTok);
-            message.setContextualProperty(SecurityConstants.TOKEN_ID, tempTok.getId());
+            message.put(SecurityConstants.TOKEN_ID, tempTok.getId());
             
             addSig(doIssuedTokenSignature(token, wrapper));
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/PolicyBasedSamlTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/PolicyBasedSamlTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/PolicyBasedSamlTest.java
index 5ed6e71..34a5aaa 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/PolicyBasedSamlTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/PolicyBasedSamlTest.java
@@ -115,8 +115,8 @@ public class PolicyBasedSamlTest extends AbstractPolicySecurityTest {
         // Necessary because the Bearer Assertion does not have an internal signature
         SamlAssertionValidator assertionValidator = new SamlAssertionValidator();
         assertionValidator.setRequireBearerSignature(false);
-        inmsg.setContextualProperty(SecurityConstants.SAML2_TOKEN_VALIDATOR, assertionValidator);
-        inmsg.setContextualProperty(SecurityConstants.SAML1_TOKEN_VALIDATOR, assertionValidator);
+        inmsg.put(SecurityConstants.SAML2_TOKEN_VALIDATOR, assertionValidator);
+        inmsg.put(SecurityConstants.SAML1_TOKEN_VALIDATOR, assertionValidator);
         inHandler.handleMessage(inmsg);
 
         for (CoverageType type : types) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/LocatorServiceImpl.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/LocatorServiceImpl.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/LocatorServiceImpl.java
index 6eb98c8..bd5ce39 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/LocatorServiceImpl.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/LocatorServiceImpl.java
@@ -91,7 +91,7 @@ public class LocatorServiceImpl implements LocatorService {
         // create a wsdlLocation attribute with a location only
         if (serviceQname.getNamespaceURI().endsWith("2")) {
             Message m = PhaseInterceptorChain.getCurrentMessage();
-            m.setContextualProperty("org.apache.cxf.wsa.metadata.wsdlLocationOnly", "true");
+            m.put("org.apache.cxf.wsa.metadata.wsdlLocationOnly", "true");
         }
         
         ClassLoader cl = Thread.currentThread().getContextClassLoader();

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlRetrievalInterceptor.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlRetrievalInterceptor.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlRetrievalInterceptor.java
index dcf096e..f0f53b8 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlRetrievalInterceptor.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlRetrievalInterceptor.java
@@ -66,7 +66,7 @@ public class SamlRetrievalInterceptor extends AbstractPhaseInterceptor<Message>
             SamlAssertionWrapper assertion = new SamlAssertionWrapper(samlCallback);
             Document doc = DOMUtils.createDocument();
             Element token = assertion.toDOM(doc);
-            message.setContextualProperty(SAMLConstants.SAML_TOKEN_ELEMENT, token);
+            message.put(SAMLConstants.SAML_TOKEN_ELEMENT, token);
         } catch (WSSecurityException ex) {
             StringWriter sw = new StringWriter();
             ex.printStackTrace(new PrintWriter(sw));

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe611ce6/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
index 1dd6b28..7de20d2 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/RobustServiceWithFaultTest.java
@@ -176,7 +176,7 @@ public class RobustServiceWithFaultTest extends AbstractBusClientServerTestBase
         
         @Override
         public void handleMessage(Message message) throws Fault {
-            message.setContextualProperty(Message.ROBUST_ONEWAY, robust);
+            message.put(Message.ROBUST_ONEWAY, robust);
         }
     }
 }


Mime
View raw message