cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject [2/3] cxf git commit: [CXF-6421] Slim Exchange map down * Avoid storing Bus, Service, Endpoint, Binding, BindingOperationInfo into Exchange's map as there're direct accessors for them * Avoid storing ServiceInfo, InterfaceInfo, BindingInfo into Exchange'
Date Tue, 26 May 2015 20:00:12 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
index e32f05c..5c3e389 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
@@ -264,7 +264,7 @@ public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message> {
     }
     
     private Message createOutMessage(Message inMessage, Response r) {
-        Endpoint e = inMessage.getExchange().get(Endpoint.class);
+        Endpoint e = inMessage.getExchange().getEndpoint();
         Message mout = e.getBinding().createMessage();
         mout.setContent(List.class, new MessageContentsList(r));
         mout.setExchange(inMessage.getExchange());

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
index 1ca4bf9..d26c1b8 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
@@ -21,7 +21,6 @@ package org.apache.cxf.jaxrs.model;
 
 import java.util.Comparator;
 
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.ext.ResourceComparator;
 import org.apache.cxf.message.Message;
 
@@ -33,7 +32,7 @@ public class ClassResourceInfoComparator implements Comparator<ClassResourceInfo
     public ClassResourceInfoComparator(Message m) {
         this.message = m;
         if (message != null) {
-            Object o = m.getExchange().get(Endpoint.class).get("org.apache.cxf.jaxrs.comparator");
+            Object o = m.getExchange().getEndpoint().get("org.apache.cxf.jaxrs.comparator");
             if (o != null) {
                 rc = (ResourceComparator)o;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java
index 5def5a2..4ed790f 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java
@@ -26,7 +26,6 @@ import java.util.List;
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.core.MediaType;
 
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.ext.DefaultMethod;
 import org.apache.cxf.jaxrs.ext.ResourceComparator;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
@@ -44,7 +43,7 @@ public class OperationResourceInfoComparator implements Comparator<OperationReso
     public OperationResourceInfoComparator(Message m, String method) {
         this.message = m;
         if (message != null) {
-            Object o = m.getExchange().get(Endpoint.class).get("org.apache.cxf.jaxrs.comparator");
+            Object o = m.getExchange().getEndpoint().get("org.apache.cxf.jaxrs.comparator");
             if (o != null) {
                 rc = (ResourceComparator)o;
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXRSDataBinding.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXRSDataBinding.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXRSDataBinding.java
index 24582cc..99e90f0 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXRSDataBinding.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXRSDataBinding.java
@@ -99,9 +99,9 @@ public class JAXRSDataBinding extends AbstractDataBinding {
 
     // TODO: The method containing the actual annotations have to retrieved 
     protected Method getTargetMethod(Message m) {
-        BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = m.getExchange().getBindingOperationInfo();
         MethodDispatcher md = (MethodDispatcher) 
-            m.getExchange().get(Service.class).get(MethodDispatcher.class.getName());
+            m.getExchange().getService().get(MethodDispatcher.class.getName());
         return md.getMethod(bop);
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index b59d7e3..6029d2c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -945,7 +945,7 @@ public abstract class ProviderFactory {
     }
     
     public static ProviderFactory getInstance(Message m) {
-        Endpoint e = m.getExchange().get(Endpoint.class);
+        Endpoint e = m.getExchange().getEndpoint();
         
         Message outM = m.getExchange().getOutMessage();
         boolean isClient = outM != null && MessageUtils.isRequestor(outM);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
index 0094ace..d3a6ca24 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
@@ -120,7 +120,7 @@ public final class ServerProviderFactory extends ProviderFactory {
     }
     
     public static ServerProviderFactory getInstance(Message m) {
-        Endpoint e = m.getExchange().get(Endpoint.class);
+        Endpoint e = m.getExchange().getEndpoint();
         return (ServerProviderFactory)e.get(SERVER_FACTORY_NAME);
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
index dc8fa6d..e42c232 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
@@ -568,7 +568,7 @@ public final class JAXRSUtils {
     }
     
     public static List<ClassResourceInfo> getRootResources(Message message) {
-        Service service = message.getExchange().get(Service.class);
+        Service service = message.getExchange().getService();
         return ((JAXRSServiceImpl)service).getClassResourceInfos();
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
index fabcdd2..190ea1a 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
@@ -296,7 +296,7 @@ public abstract class AbstractJAXWSMethodInvoker extends FactoryInvoker {
         }
         Message m = exchange.getOutMessage();
         if (m == null && !exchange.isOneWay()) {
-            Endpoint ep = exchange.get(Endpoint.class);
+            Endpoint ep = exchange.getEndpoint();
             m = new MessageImpl();
             m.setExchange(exchange);
             m = ep.getBinding().createMessage(m);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
index 7d19630..936864b 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
@@ -80,7 +80,7 @@ public class WebServiceContextImpl implements WebServiceContext {
     public EndpointReference getEndpointReference(Element... referenceParameters) {
         WrappedMessageContext ctx = (WrappedMessageContext)getMessageContext();
         org.apache.cxf.message.Message msg = ctx.getWrappedMessage();
-        Endpoint ep = msg.getExchange().get(Endpoint.class);
+        Endpoint ep = msg.getExchange().getEndpoint();
 
         W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
         builder.address(ep.getEndpointInfo().getAddress());

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
index f1d245a..fa7cc77 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
@@ -306,15 +306,15 @@ public class WrappedMessageContext implements MessageContext {
     }
     
     private static BindingOperationInfo getBindingOperationInfo(Exchange exchange) {
-        if (exchange != null && exchange.get(BindingOperationInfo.class) != null) {
-            return exchange.get(BindingOperationInfo.class);
+        if (exchange != null && exchange.getBindingOperationInfo() != null) {
+            return exchange.getBindingOperationInfo();
         }
         return null;
     }
 
     private static EndpointInfo getEndpointInfo(Exchange exchange) {
         if (exchange != null) {
-            Endpoint endpoint = exchange.get(Endpoint.class);
+            Endpoint endpoint = exchange.getEndpoint();
             if (endpoint != null) {
                 return endpoint.getEndpointInfo();
             }
@@ -336,7 +336,7 @@ public class WrappedMessageContext implements MessageContext {
                 m = exchange.getInMessage();
             }
             if (m == null) {
-                Endpoint ep = exchange.get(Endpoint.class);
+                Endpoint ep = exchange.getEndpoint();
                 m = new org.apache.cxf.message.MessageImpl();
                 m.setExchange(exchange);
                 m = ep.getBinding().createMessage(m);
@@ -348,7 +348,7 @@ public class WrappedMessageContext implements MessageContext {
                 m = exchange.getOutFaultMessage();
             }
             if (m == null) {
-                Endpoint ep = exchange.get(Endpoint.class);
+                Endpoint ep = exchange.getEndpoint();
                 m = new org.apache.cxf.message.MessageImpl();
                 m.setExchange(exchange);
                 m = ep.getBinding().createMessage(m);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
index f194d51..5a5896a 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
@@ -26,7 +26,6 @@ import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
 
 public abstract class AbstractJAXWSHandlerInterceptor<T extends Message> extends AbstractPhaseInterceptor<T> {
@@ -106,7 +105,7 @@ public abstract class AbstractJAXWSHandlerInterceptor<T extends Message> extends
     }
     
     protected void setupBindingOperationInfo(Exchange exch, Object data) {
-        if (exch.get(BindingOperationInfo.class) == null) {
+        if (exch.getBindingOperationInfo() == null) {
             //need to know the operation to determine if oneway
             QName opName = getOpQName(exch, data);
             if (opName == null) {
@@ -119,7 +118,6 @@ public abstract class AbstractJAXWSHandlerInterceptor<T extends Message> extends
             }
             if (bop != null) {
                 exch.put(BindingOperationInfo.class, bop);
-                exch.put(OperationInfo.class, bop.getOperationInfo());
                 if (bop.getOutput() == null) {
                     exch.setOneWay(true);
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
index 09d0c79..cec7d65 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
@@ -30,7 +30,6 @@ import javax.xml.ws.Binding;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.InterceptorChain;
@@ -130,7 +129,7 @@ public class LogicalHandlerFaultOutInterceptor
                 if (null == faultMessage) {
                     faultMessage = new MessageImpl();
                     faultMessage.setExchange(message.getExchange());
-                    faultMessage = exchange.get(Endpoint.class).getBinding().createMessage(faultMessage);
+                    faultMessage = exchange.getEndpoint().getBinding().createMessage(faultMessage);
                 }
                 faultMessage.setContent(Exception.class, ex);
                 if (null != mode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
index 4a7b284..d8173b0 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
@@ -83,7 +83,7 @@ public class LogicalHandlerInInterceptor
 
         if (!message.getExchange().isOneWay()) {
             //server side inbound
-            Endpoint e = message.getExchange().get(Endpoint.class);
+            Endpoint e = message.getExchange().getEndpoint();
             Message responseMsg = new MessageImpl();
             responseMsg.setExchange(message.getExchange());
             responseMsg = e.getBinding().createMessage(responseMsg);            

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
index 671c45a..9355110 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
@@ -147,7 +147,7 @@ public class LogicalHandlerOutInterceptor
                     // client side - abort
                     message.getInterceptorChain().abort();
                     if (!message.getExchange().isOneWay()) {
-                        Endpoint e = message.getExchange().get(Endpoint.class);
+                        Endpoint e = message.getExchange().getEndpoint();
                         Message responseMsg = new MessageImpl();
                         responseMsg.setExchange(message.getExchange());
                         responseMsg = e.getBinding().createMessage(responseMsg);            

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
index db6f55f..76a5164 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
@@ -134,7 +134,7 @@ public class SOAPHandlerInterceptor extends
                 }
             }
             if (isFault) {
-                Endpoint ep = message.getExchange().get(Endpoint.class);
+                Endpoint ep = message.getExchange().getEndpoint();
                 message.getInterceptorChain().abort();
                 if (ep.getInFaultObserver() != null) {
                     ep.getInFaultObserver().onMessage(message);
@@ -189,7 +189,7 @@ public class SOAPHandlerInterceptor extends
                 MessageObserver observer = message.getExchange().get(MessageObserver.class);
                 if (!message.getExchange().isOneWay()
                     && observer != null) {
-                    Endpoint e = message.getExchange().get(Endpoint.class);
+                    Endpoint e = message.getExchange().getEndpoint();
                     Message responseMsg = new MessageImpl();
                     responseMsg.setExchange(message.getExchange());
                     responseMsg = e.getBinding().createMessage(responseMsg);
@@ -219,7 +219,7 @@ public class SOAPHandlerInterceptor extends
             if (!getInvoker(message).isOutbound()) {
                 // server side inbound
                 message.getInterceptorChain().abort();
-                Endpoint e = message.getExchange().get(Endpoint.class);
+                Endpoint e = message.getExchange().getEndpoint();
                 if (!message.getExchange().isOneWay()) {
                     Message responseMsg = new MessageImpl();
                     responseMsg.setExchange(message.getExchange());

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
index 23e20fb..4589704 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
@@ -68,7 +68,7 @@ public class MessageModeInInterceptor extends AbstractPhaseInterceptor<Message>
     }
 
     public void handleMessage(Message message) throws Fault {
-        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class); 
+        BindingOperationInfo bop = message.getExchange().getBindingOperationInfo(); 
         if (bop == null || !bindingName.equals(bop.getBinding().getName())) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
index 815558a..16490df 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
@@ -91,7 +91,7 @@ public class MessageModeOutInterceptor extends AbstractPhaseInterceptor<Message>
         this.bindingName = bname;
     }
     public void handleMessage(Message message) throws Fault {
-        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
         if (bop != null && !bindingName.equals(bop.getBinding().getName())) {
             return;
         }
@@ -316,7 +316,7 @@ public class MessageModeOutInterceptor extends AbstractPhaseInterceptor<Message>
                 }
             }
 
-            BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
+            BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
             DocumentFragment frag = soapMessage.getSOAPPart().createDocumentFragment();
             try {
                 Node body = SAAJUtils.getBody(soapMessage);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
index 4d2a014..49e94ed 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
@@ -47,7 +47,6 @@ import org.apache.cxf.interceptor.FaultOutInterceptor;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.FaultInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
@@ -141,7 +140,7 @@ public class WebFaultOutInterceptor extends FaultOutInterceptor {
             } catch (IllegalArgumentException e) {
                 throw new Fault(new org.apache.cxf.common.i18n.Message("COULD_NOT_INVOKE", BUNDLE), e);
             }
-            Service service = message.getExchange().get(Service.class);
+            Service service = message.getExchange().getService();
 
             try {
                 DataWriter<XMLStreamWriter> writer 
@@ -153,7 +152,7 @@ public class WebFaultOutInterceptor extends FaultOutInterceptor {
                     writer.setSchema(schema);
                 }
 
-                OperationInfo op = message.getExchange().get(BindingOperationInfo.class).getOperationInfo();
+                OperationInfo op = message.getExchange().getBindingOperationInfo().getOperationInfo();
                 QName faultName = getFaultName(fault, cause.getClass(), op);
                 MessagePartInfo part = getFaultMessagePart(faultName, op);
                 if (f.hasDetails()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
index 9e29115..316cc46 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
@@ -98,7 +98,6 @@ public class WrapperClassInInterceptor extends AbstractPhaseInterceptor<Message>
             message.put(MessageInfo.class, messageInfo);
             message.put(BindingMessageInfo.class, bmi);
             ex.put(BindingOperationInfo.class, boi2);
-            ex.put(OperationInfo.class, op);
             
             if (isGET(message)) {
                 LOG.fine("WrapperClassInInterceptor skipped in HTTP GET method");

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
index 0afd9a1..f4037ad 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
@@ -41,7 +41,6 @@ import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
 import org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean;
 
@@ -110,7 +109,6 @@ public class WrapperClassOutInterceptor extends AbstractPhaseInterceptor<Message
             
             // we've now wrapped the object, so use the wrapped binding op
             ex.put(BindingOperationInfo.class, newbop);
-            ex.put(OperationInfo.class, newbop.getOperationInfo());
             
             if (messageInfo == bop.getOperationInfo().getInput()) {
                 message.put(MessageInfo.class, newbop.getOperationInfo().getInput());

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
index c50608f..6cb2a16 100644
--- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
+++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
@@ -76,7 +76,7 @@ public class WSDLGetInterceptor extends AbstractPhaseInterceptor<Message> {
         if (isRecognizedQuery(map)) {
             Document doc = getDocument(utils, message, baseUri, map, ctx);
             
-            Endpoint e = message.getExchange().get(Endpoint.class);
+            Endpoint e = message.getExchange().getEndpoint();
             Message mout = new MessageImpl();
             mout.setExchange(message.getExchange());
             mout = e.getBinding().createMessage(mout);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
index bbfd589..625cc22 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
@@ -90,7 +90,7 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
     }
 
     private void increaseCounter(Exchange ex, MessageHandlingTimeRecorder mhtr) {
-        Bus bus = ex.get(Bus.class);
+        Bus bus = ex.getBus();
         if (null == bus) {
             LOG.log(Level.INFO, "CAN_NOT_GET_BUS_FROM_EXCHANGE");
             bus = BusFactory.getThreadDefaultBus();
@@ -110,13 +110,13 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
     }
     
     protected ObjectName getServiceCounterName(Exchange ex) {
-        Bus bus = ex.get(Bus.class);
+        Bus bus = ex.getBus();
         StringBuilder buffer = new StringBuilder();
         if (ex.get("org.apache.cxf.management.service.counter.name") != null) {
             buffer.append((String)ex.get("org.apache.cxf.management.service.counter.name"));
         } else {
-            Service service = ex.get(Service.class);
-            Endpoint endpoint = ex.get(Endpoint.class);
+            Service service = ex.getService();
+            Endpoint endpoint = ex.getEndpoint();
 
             String serviceName = "\"" + escapePatternChars(service.getName().toString()) + "\"";
             String portName = "\"" + endpoint.getEndpointInfo().getName().getLocalPart() + "\"";
@@ -146,7 +146,7 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
     }
   
     protected boolean isServiceCounterEnabled(Exchange ex) {
-        Bus bus = ex.get(Bus.class);
+        Bus bus = ex.getBus();
         CounterRepository counterRepo = bus.getExtension(CounterRepository.class);
         if (counterRepo == null) {
             return false;
@@ -158,7 +158,7 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
     }
     
     protected ObjectName getOperationCounterName(Exchange ex, ObjectName sericeCounterName) {
-        OperationInfo opInfo = ex.get(OperationInfo.class);
+        OperationInfo opInfo = ex.getBindingOperationInfo().getOperationInfo();
         String operationName = opInfo == null ? null : "\"" + opInfo.getName().getLocalPart() + "\"";
 
         if (operationName == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java b/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
index 524e2e1..c0f9676 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
@@ -164,10 +164,10 @@ public class PersistOutInterceptor extends AbstractPhaseInterceptor<Message> {
 
             try {
 
-                Service service = message.getExchange().get(Service.class);
+                Service service = message.getExchange().getService();
 
                 String serviceName = String.valueOf(service.getName());
-                OperationInfo opInfo = message.getExchange().get(OperationInfo.class);
+                OperationInfo opInfo = message.getExchange().getBindingOperationInfo().getOperationInfo();
                 String operationName = opInfo == null ? null : opInfo.getName().getLocalPart();
 
                 if (operationName == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
----------------------------------------------------------------------
diff --git a/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java b/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
index 751f903..122396b 100644
--- a/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
+++ b/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
@@ -30,6 +30,7 @@ import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.easymock.EasyMock;
@@ -106,18 +107,18 @@ public class AbstractMessageResponseTestBase extends Assert {
     }
     
     protected void setupExchangeForMessage() {
-        EasyMock.expect(exchange.get(Bus.class)).andReturn(bus).anyTimes();
+        EasyMock.expect(exchange.getBus()).andReturn(bus).anyTimes();
        
         Service service = EasyMock.createMock(Service.class);
         EasyMock.expect(service.getName()).andReturn(SERVICE_NAME).anyTimes();        
-        EasyMock.expect(exchange.get(Service.class)).andReturn(service).anyTimes();
+        EasyMock.expect(exchange.getService()).andReturn(service).anyTimes();
         EasyMock.replay(service);
         
         Endpoint endpoint = EasyMock.createMock(Endpoint.class);
         EndpointInfo endpointInfo = EasyMock.createMock(EndpointInfo.class);
         EasyMock.expect(endpointInfo.getName()).andReturn(PORT_NAME).anyTimes();
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(endpointInfo).anyTimes();
-        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(endpoint).anyTimes();
+        EasyMock.expect(exchange.getEndpoint()).andReturn(endpoint).anyTimes();
         EasyMock.replay(endpointInfo);
         EasyMock.replay(endpoint);
         
@@ -128,9 +129,11 @@ public class AbstractMessageResponseTestBase extends Assert {
       
     protected void setupOperationForMessage() {
         OperationInfo op = EasyMock.createMock(OperationInfo.class);
-        EasyMock.expect(op.getName()).andReturn(OPERATION_NAME);        
-        EasyMock.expect(exchange.get(OperationInfo.class)).andReturn(op);
-        EasyMock.replay(op);
+        BindingOperationInfo bop = EasyMock.createMock(BindingOperationInfo.class);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(bop);
+        EasyMock.expect(bop.getOperationInfo()).andReturn(op);
+        EasyMock.expect(op.getName()).andReturn(OPERATION_NAME);
+        EasyMock.replay(bop, op);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java b/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
index 31ead54..bc55710 100644
--- a/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
+++ b/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.management.interceptor;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.interceptor.InterceptorChain;
 import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
 import org.apache.cxf.message.FaultMode;
@@ -140,7 +139,7 @@ public class ResponseTimeMessageOutInterceptorTest extends AbstractMessageRespon
     public void testClientMessageOut() {
         EasyMock.expect(message.get(Message.PARTIAL_RESPONSE_MESSAGE)).andReturn(Boolean.FALSE).anyTimes();
         EasyMock.expect(message.getExchange()).andReturn(exchange);
-        EasyMock.expect(exchange.get(Bus.class)).andReturn(bus);
+        EasyMock.expect(exchange.getBus()).andReturn(bus);
         EasyMock.expect(exchange.get("org.apache.cxf.management.counter.enabled")).andReturn(null);
         EasyMock.replay(exchange);
         EasyMock.replay(message);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
index 65055a4..cd2370d 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProviderFactory.java
@@ -60,7 +60,7 @@ public final class ClientProviderFactory extends ProviderFactory {
     }
     
     public static ClientProviderFactory getInstance(Message m) {
-        Endpoint e = m.getExchange().get(Endpoint.class);
+        Endpoint e = m.getExchange().getEndpoint();
         return (ClientProviderFactory)e.get(CLIENT_FACTORY_NAME);
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index 9e1b179..05b4ead 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -316,7 +316,7 @@ public class ClientProxyImpl extends AbstractClient implements
                 throw t;
             }
             
-            Endpoint ep = inMessage.getExchange().get(Endpoint.class);
+            Endpoint ep = inMessage.getExchange().getEndpoint();
             inMessage.getExchange().put(InterceptorProvider.class, getConfiguration());
             inMessage.setContent(Exception.class, new Fault(t));
             inMessage.getInterceptorChain().abort();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 24de86b..01caeb5 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -121,7 +121,6 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.jaxrs.utils.schemas.SchemaHandler;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.staxutils.DelegatingXMLStreamWriter;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -340,7 +339,7 @@ public class WadlGenerator implements ContainerRequestFilter {
     }
 
     private String getBaseURI(Message m, UriInfo ui) {
-        EndpointInfo ei = m.getExchange().get(Endpoint.class).getEndpointInfo();
+        EndpointInfo ei = m.getExchange().getEndpoint().getEndpointInfo();
         String publishedEndpointUrl = (String)ei.getProperty("publishedEndpointUrl");
         if (publishedEndpointUrl == null) {
             return ui.getBaseUri().toString();
@@ -1116,7 +1115,7 @@ public class WadlGenerator implements ContainerRequestFilter {
         if (!path.startsWith(slash)) {
             path = slash + path;
         }
-        List<ClassResourceInfo> all = ((JAXRSServiceImpl)m.getExchange().get(Service.class))
+        List<ClassResourceInfo> all = ((JAXRSServiceImpl)m.getExchange().getService())
             .getClassResourceInfos();
         boolean absolutePathSlashOn = checkAbsolutePathSlash && ui.getAbsolutePath().getPath().endsWith(slash);
         if (slash.equals(path) && !absolutePathSlashOn) {
@@ -1135,7 +1134,7 @@ public class WadlGenerator implements ContainerRequestFilter {
 
     // TODO: deal with caching later on
     public Response getExistingWadl(Message m, UriInfo ui, MediaType mt) {
-        Endpoint ep = m.getExchange().get(Endpoint.class);
+        Endpoint ep = m.getExchange().getEndpoint();
         if (ep != null) {
             String loc = (String)ep.get(JAXRSUtils.DOC_LOCATION);
             if (loc != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
index 70a1905..167d763 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.HttpHeaders;
 
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.rs.security.jose.JoseException;
 import org.apache.cxf.rs.security.jose.JoseHeaders;
@@ -48,7 +47,7 @@ public class JwtAuthenticationClientFilter extends AbstractJoseJwtProducer
         boolean jweRequired = false;
         if (jwt == null) {
             AuthorizationPolicy ap = JAXRSUtils.getCurrentMessage().getExchange()
-                .get(Endpoint.class).getEndpointInfo().getExtensor(AuthorizationPolicy.class);
+                .getEndpoint().getEndpointInfo().getExtensor(AuthorizationPolicy.class);
             if (ap != null && ap.getUserName() != null) {
                 JwtClaims claims = new JwtClaims();
                 claims.setSubject(ap.getUserName());

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/CryptoLoader.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/CryptoLoader.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/CryptoLoader.java
index 005940f..a22232d 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/CryptoLoader.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/CryptoLoader.java
@@ -94,7 +94,7 @@ public class CryptoLoader {
     }
     
     public final Map<Object, Crypto> getCryptoCache(Message message) {
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         if (endpoint != null) {
             EndpointInfo info  = endpoint.getEndpointInfo();
             synchronized (info) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/ClaimsAuthorizingInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/ClaimsAuthorizingInterceptor.java b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/ClaimsAuthorizingInterceptor.java
index c0244ea..6312fe3 100644
--- a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/ClaimsAuthorizingInterceptor.java
+++ b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/ClaimsAuthorizingInterceptor.java
@@ -43,7 +43,6 @@ import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.security.claims.authorization.Claim;
 import org.apache.cxf.security.claims.authorization.ClaimMode;
 import org.apache.cxf.security.claims.authorization.Claims;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.invoker.MethodDispatcher;
 import org.apache.cxf.service.model.BindingOperationInfo;
 
@@ -88,10 +87,10 @@ public class ClaimsAuthorizingInterceptor extends AbstractPhaseInterceptor<Messa
     }
     
     protected Method getTargetMethod(Message m) {
-        BindingOperationInfo bop = m.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = m.getExchange().getBindingOperationInfo();
         if (bop != null) {
             MethodDispatcher md = (MethodDispatcher) 
-                m.getExchange().get(Service.class).get(MethodDispatcher.class.getName());
+                m.getExchange().getService().get(MethodDispatcher.class.getName());
             return md.getMethod(bop);
         } 
         Method method = (Method)m.get("org.apache.cxf.resource.method");

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
----------------------------------------------------------------------
diff --git a/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java b/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
index a7a7148..a1cefcd 100644
--- a/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
+++ b/rt/security/src/main/java/org/apache/cxf/rt/security/utils/SecurityUtils.java
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
 
 import javax.security.auth.callback.CallbackHandler;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.classloader.ClassLoaderUtils.ClassLoaderHolder;
 import org.apache.cxf.common.logging.LogUtils;
@@ -78,8 +77,8 @@ public final class SecurityUtils {
             msg = PhaseInterceptorChain.getCurrentMessage();
         }
         ResourceManager manager = null;
-        if (msg != null && msg.getExchange() != null && msg.getExchange().get(Bus.class) != null) {
-            manager = msg.getExchange().get(Bus.class).getExtension(ResourceManager.class);
+        if (msg != null && msg.getExchange() != null && msg.getExchange().getBus() != null) {
+            manager = msg.getExchange().getBus().getExtension(ResourceManager.class);
         }
         return loadResource(manager, o);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
index 96f0377..1462a67 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
@@ -1177,7 +1177,7 @@ public abstract class HTTPConduit
                         };
                     }
                     if (ex == null || forceWQ) {
-                        WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
+                        WorkQueueManager mgr = outMessage.getExchange().getBus()
                             .getExtension(WorkQueueManager.class);
                         AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
                         if (qu == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
index cfe08c4..826d54b 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
@@ -92,7 +92,7 @@ final class InternalContextUtils {
             if (ContextUtils.isNoneAddress(reference)) {
                 return null;
             }
-            Bus bus = inMessage.getExchange().get(Bus.class);
+            Bus bus = inMessage.getExchange().getBus();
             //this is a response targeting a decoupled endpoint.   Treat it as a oneway so
             //we don't wait for a response.
             inMessage.getExchange().setOneWay(true);
@@ -219,7 +219,7 @@ final class InternalContextUtils {
                     exchange.setDestination(target);
                     exchange.setOneWay(false);
                     exchange.put(ConduitSelector.class,
-                                 new PreexistingConduitSelector(backChannel, exchange.get(Endpoint.class)));
+                                 new PreexistingConduitSelector(backChannel, exchange.getEndpoint()));
                     if (newChian != null && !newChian.doIntercept(partialResponse)
                         && partialResponse.getContent(Exception.class) != null) {
                         if (partialResponse.getContent(Exception.class) instanceof Fault) {
@@ -238,7 +238,7 @@ final class InternalContextUtils {
                         MessageUtils.isTrue(inMessage.getContextualProperty(Message.ROBUST_ONEWAY));
                     
                     if (robust) {
-                        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+                        BindingOperationInfo boi = exchange.getBindingOperationInfo();
                         // insert the executor in the exchange to fool the OneWayProcessorInterceptor
                         exchange.put(Executor.class, getExecutor(inMessage));
                         // pause dispatch on current thread and resume...
@@ -265,7 +265,7 @@ final class InternalContextUtils {
                     partialResponse.setInterceptorChain(chain);
                     exchange.put(ConduitSelector.class,
                                  new PreexistingConduitSelector(backChannel,
-                                                                exchange.get(Endpoint.class)));
+                                                                exchange.getEndpoint()));
 
                     if (chain != null && !chain.doIntercept(partialResponse) 
                         && partialResponse.getContent(Exception.class) != null) {
@@ -341,7 +341,7 @@ final class InternalContextUtils {
 
     public static Destination createDecoupledDestination(
         Exchange exchange, final EndpointReferenceType reference) {
-        final EndpointInfo ei = exchange.get(Endpoint.class).getEndpointInfo();
+        final EndpointInfo ei = exchange.getEndpoint().getEndpointInfo();
         return new DecoupledDestination(ei, reference);
     }
     
@@ -394,7 +394,9 @@ final class InternalContextUtils {
                 action = getActionFromServiceModel(message, fault);
             }
         }
-        LOG.fine("action: " + action);
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("action: " + action);
+        }
         return action != null ? ContextUtils.getAttributedURI(action) : null;
     }
 
@@ -408,7 +410,7 @@ final class InternalContextUtils {
                                                     Exception fault) {
         String action = null;
         BindingOperationInfo bindingOpInfo =
-            message.getExchange().get(BindingOperationInfo.class);
+            message.getExchange().getBindingOperationInfo();
         if (bindingOpInfo != null) {
             if (bindingOpInfo.isUnwrappedCapable()) {
                 bindingOpInfo = bindingOpInfo.getUnwrappedOperation();
@@ -468,7 +470,9 @@ final class InternalContextUtils {
                 }
             }
         }
-        LOG.fine("action determined from service model: " + action);
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("action determined from service model: " + action);
+        }
         return action;
     }
 
@@ -526,12 +530,12 @@ final class InternalContextUtils {
      * @return
      */
     private static Executor getExecutor(final Message message) {
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         Executor executor = endpoint.getService().getExecutor();
         
         if (executor == null || SynchronousExecutor.isA(executor)) {
             // need true asynchrony
-            Bus bus = message.getExchange().get(Bus.class);
+            Bus bus = message.getExchange().getBus();
             if (bus != null) {
                 WorkQueueManager workQueueManager =
                     bus.getExtension(WorkQueueManager.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
index e013431..afa174e 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
@@ -206,7 +206,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
     */
     private boolean hasUsingAddressing(Message message) {
         boolean ret = false;
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         if (null != endpoint) {
             Boolean b = (Boolean)endpoint.get(USING_ADDRESSING);
             if (null == b) {
@@ -716,7 +716,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
     }
 
     protected String getActionUri(Message message, boolean checkMessage) {
-        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
         if (bop == null || Boolean.TRUE.equals(bop.getProperty("operation.is.synthetic"))) {
             return null;
         }
@@ -910,7 +910,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
     private EndpointReferenceType getReplyTo(Message message, 
                                              EndpointReferenceType originalReplyTo) {
         Exchange exchange = message.getExchange();
-        Endpoint info = exchange.get(Endpoint.class);
+        Endpoint info = exchange.getEndpoint();
         if (info == null) {
             return originalReplyTo;
         }
@@ -942,7 +942,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
     private Destination createDecoupledDestination(Message message) {
         String replyToAddress = (String)message.getContextualProperty(WSAContextUtils.REPLYTO_PROPERTY);
         if (replyToAddress != null) {
-            return setUpDecoupledDestination(message.getExchange().get(Bus.class),
+            return setUpDecoupledDestination(message.getExchange().getBus(),
                                              replyToAddress, 
                                              message);
         }
@@ -981,7 +981,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
         DestinationFactory factory =
             factoryManager.getDestinationFactoryForUri(address);
         if (factory != null) {
-            Endpoint ep = message.getExchange().get(Endpoint.class);
+            Endpoint ep = message.getExchange().getEndpoint();
             
             EndpointInfo ei = new EndpointInfo();
             ei.setName(new QName(ep.getEndpointInfo().getName().getNamespaceURI(),

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/ContextUtilsTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/ContextUtilsTest.java b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/ContextUtilsTest.java
index 8931ef6..4b4f751 100755
--- a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/ContextUtilsTest.java
+++ b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/impl/ContextUtilsTest.java
@@ -126,7 +126,7 @@ public class ContextUtilsTest extends Assert {
 
         // test 1 : retrieving the normal action prop from the message
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         EasyMock.expect(msg.get(ContextUtils.ACTION)).andReturn("urn:foo:test:1");
         control.replay();
         
@@ -137,7 +137,7 @@ public class ContextUtilsTest extends Assert {
 
         // test 2 : retrieving the normal soap action prop from the message
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         EasyMock.expect(msg.get(SoapBindingConstants.SOAP_ACTION)).andReturn("urn:foo:test:2");
         control.replay();
         
@@ -148,7 +148,7 @@ public class ContextUtilsTest extends Assert {
 
         // test 3 : retrieving the action prop from the message info
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         messageInfo.setProperty(ContextUtils.ACTION, "urn:foo:test:3");
         control.replay();
         
@@ -161,7 +161,7 @@ public class ContextUtilsTest extends Assert {
         SoapFault fault = new SoapFault("faulty service", new RuntimeException(), fqname);
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
         EasyMock.expect(msg.getContent(Exception.class)).andReturn(fault).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         control.replay();
         
         action = InternalContextUtils.getAction(msg);
@@ -174,7 +174,7 @@ public class ContextUtilsTest extends Assert {
         faultInfo.addExtensionAttribute(Names.WSAW_ACTION_QNAME, "urn:foo:test:4");
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
         EasyMock.expect(msg.getContent(Exception.class)).andReturn(fault).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         control.replay();
         
         action = InternalContextUtils.getAction(msg);
@@ -188,7 +188,7 @@ public class ContextUtilsTest extends Assert {
                                         Names.ACTION_MISMATCH_NAME));
         EasyMock.expect(msg.getExchange()).andReturn(exchange).anyTimes();
         EasyMock.expect(msg.getContent(Exception.class)).andReturn(fault).anyTimes();
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         control.replay();
         
         action = InternalContextUtils.getAction(msg);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/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 248dd4b..4fb0707 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
@@ -637,7 +637,7 @@ public class MAPAggregatorTest extends Assert {
             EasyMock.expectLastCall().andReturn(serv).anyTimes();
             serv.getOutInterceptors();
             EasyMock.expectLastCall().andReturn(new ArrayList<Interceptor<? extends Message>>()).anyTimes();
-            exchange.get(Endpoint.class);
+            exchange.getEndpoint();
             EasyMock.expectLastCall().andReturn(endpoint).anyTimes();
         }
         control.replay();
@@ -820,7 +820,7 @@ public class MAPAggregatorTest extends Assert {
                              "org.apache.cxf.ws.addressing.partial.response.sent",
                              Boolean.FALSE);
         Endpoint endpoint = control.createMock(Endpoint.class);
-        exchange.get(Endpoint.class);
+        exchange.getEndpoint();
         EasyMock.expectLastCall().andReturn(endpoint);
         Binding binding = control.createMock(Binding.class);
         endpoint.getBinding();        
@@ -865,6 +865,7 @@ public class MAPAggregatorTest extends Assert {
                                                                        "opResponse",
                                                                        "opFault", method);
         setUpExchangeGet(exchange, BindingOperationInfo.class, bindingOpInfo);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(bindingOpInfo).anyTimes();
         // Usual fun with EasyMock not always working as expected
         //BindingOperationInfo bindingOpInfo =
         //    EasyMock.createMock(BindingOperationInfo.class); 
@@ -905,7 +906,7 @@ public class MAPAggregatorTest extends Assert {
         EasyMock.expectLastCall().andReturn(new PhaseManagerImpl()).anyTimes();
         
         Exchange exchange = control.createMock(Exchange.class);
-        exchange.get(Bus.class);
+        exchange.getBus();
         EasyMock.expectLastCall().andReturn(bus).anyTimes();
         EasyMock.expect(exchange.isEmpty()).andReturn(true).anyTimes();
         return exchange;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
index b9fe297..ee92e62 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
@@ -59,14 +59,14 @@ public class ClientPolicyInFaultInterceptor extends AbstractPolicyInterceptor {
         Exchange exchange = msg.getExchange();
         assert null != exchange;
         
-        Endpoint e = exchange.get(Endpoint.class);
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;
         }
         EndpointInfo ei = e.getEndpointInfo();
         
-        Bus bus = exchange.get(Bus.class);
+        Bus bus = exchange.getBus();
         PolicyEngine pe = bus.getExtension(PolicyEngine.class);
         if (null == pe) {
             return;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
index c91cb5a..fba11fd 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
@@ -54,8 +54,8 @@ public class PolicyInInterceptor extends AbstractPolicyInterceptor {
     
     protected void handle(Message msg) {
         Exchange exchange = msg.getExchange();
-        Bus bus = exchange.get(Bus.class);
-        Endpoint e = exchange.get(Endpoint.class);
+        Bus bus = exchange.getBus();
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;
@@ -84,7 +84,7 @@ public class PolicyInInterceptor extends AbstractPolicyInterceptor {
             assertions.addAll(effectivePolicy.getChosenAlternative());
         } else if (MessageUtils.isRequestor(msg)) {
             // 2. Process client policy
-            BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+            BindingOperationInfo boi = exchange.getBindingOperationInfo();
             if (boi == null) {
                 Conduit conduit = exchange.getConduit(msg);
                 EndpointPolicy ep = pe.getClientEndpointPolicy(ei, conduit, msg);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyOutInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyOutInterceptor.java
index 9f4e7bf..a14911e 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyOutInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyOutInterceptor.java
@@ -56,15 +56,15 @@ public class PolicyOutInterceptor extends AbstractPolicyInterceptor {
     
     protected void handle(Message msg) {        
         Exchange exchange = msg.getExchange();
-        Bus bus = exchange.get(Bus.class);
+        Bus bus = exchange.getBus();
         
-        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+        BindingOperationInfo boi = exchange.getBindingOperationInfo();
         if (null == boi) {
             LOG.fine("No binding operation info.");
             return;
         }
         
-        Endpoint e = exchange.get(Endpoint.class);
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptor.java
index 716c5d5..cbd82e2 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptor.java
@@ -67,20 +67,20 @@ public class PolicyVerificationInFaultInterceptor extends AbstractPolicyIntercep
         Exchange exchange = message.getExchange();
         assert null != exchange;
         
-        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+        BindingOperationInfo boi = exchange.getBindingOperationInfo();
         if (null == boi) {
             LOG.fine("No binding operation info.");
             return;
         }        
         
-        Endpoint e = exchange.get(Endpoint.class);
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;
         }
         EndpointInfo ei = e.getEndpointInfo();
         
-        Bus bus = exchange.get(Bus.class);
+        Bus bus = exchange.getBus();
         PolicyEngine pe = bus.getExtension(PolicyEngine.class);
         if (null == pe) {
             return;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptor.java
index f2fedd8..6a40d1d 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptor.java
@@ -70,14 +70,13 @@ public class PolicyVerificationInInterceptor extends AbstractPolicyInterceptor {
             return;
         }
         
-        Endpoint e = exchange.get(Endpoint.class);
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;
         } 
-        EndpointInfo ei = e.getEndpointInfo();
 
-        Bus bus = exchange.get(Bus.class);
+        Bus bus = exchange.getBus();
         PolicyEngine pe = bus.getExtension(PolicyEngine.class);
         if (null == pe) {
             return;
@@ -92,6 +91,7 @@ public class PolicyVerificationInInterceptor extends AbstractPolicyInterceptor {
         
         EffectivePolicy effectivePolicy = message.get(EffectivePolicy.class);
         if (effectivePolicy == null) {
+            EndpointInfo ei = e.getEndpointInfo();
             if (MessageUtils.isRequestor(message)) {
                 effectivePolicy = pe.getEffectiveClientResponsePolicy(ei, boi, message);
             } else {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServerPolicyOutFaultInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServerPolicyOutFaultInterceptor.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServerPolicyOutFaultInterceptor.java
index d1a44d8..0482f02 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServerPolicyOutFaultInterceptor.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServerPolicyOutFaultInterceptor.java
@@ -61,20 +61,20 @@ public class ServerPolicyOutFaultInterceptor extends AbstractPolicyInterceptor {
         Exchange exchange = msg.getExchange();
         assert null != exchange;
         
-        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+        BindingOperationInfo boi = exchange.getBindingOperationInfo();
         if (null == boi) {
             LOG.fine("No binding operation info.");
             return;
         }
         
-        Endpoint e = exchange.get(Endpoint.class);
+        Endpoint e = exchange.getEndpoint();
         if (null == e) {
             LOG.fine("No endpoint.");
             return;
         }
         EndpointInfo ei = e.getEndpointInfo();
 
-        Bus bus = exchange.get(Bus.class);
+        Bus bus = exchange.getBus();
         PolicyEngine pe = bus.getExtension(PolicyEngine.class);
         if (null == pe) {
             return;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorsTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorsTest.java b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorsTest.java
index d400bd4..9db0743 100644
--- a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorsTest.java
+++ b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorsTest.java
@@ -410,12 +410,12 @@ public class PolicyInterceptorsTest extends Assert {
 
         EasyMock.expect(message.getExchange()).andReturn(exchange);
         
-        EasyMock.expect(exchange.get(Bus.class)).andReturn(bus).anyTimes();
+        EasyMock.expect(exchange.getBus()).andReturn(bus).anyTimes();
         if (usesOperationInfo) {
             if (null == boi && setupOperation) {
                 boi = control.createMock(BindingOperationInfo.class);
             }
-            EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(setupOperation ? boi : null)
+            EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(setupOperation ? boi : null)
                 .anyTimes();
             if (!setupOperation) {
                 return;
@@ -425,7 +425,7 @@ public class PolicyInterceptorsTest extends Assert {
         if (null == endpoint && setupEndpoint) {
             endpoint = control.createMock(Endpoint.class);
         }
-        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(setupEndpoint ? endpoint : null);
+        EasyMock.expect(exchange.getEndpoint()).andReturn(setupEndpoint ? endpoint : null);
         if (!setupEndpoint) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptorTest.java b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptorTest.java
index ae8faa3..7006e31 100644
--- a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptorTest.java
+++ b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInFaultInterceptorTest.java
@@ -149,14 +149,14 @@ public class PolicyVerificationInFaultInterceptorTest extends Assert {
         if (setupOperationInfo && null == boi) {
             boi = control.createMock(BindingOperationInfo.class);
         }
-        EasyMock.expect(exchange.get(BindingOperationInfo.class)).andReturn(boi);
+        EasyMock.expect(exchange.getBindingOperationInfo()).andReturn(boi);
         if (!setupOperationInfo) {
             return;
         }
         if (setupEndpoint && null == endpoint) {
             endpoint = control.createMock(Endpoint.class);
         }
-        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(endpoint);
+        EasyMock.expect(exchange.getEndpoint()).andReturn(endpoint);
         if (!setupEndpoint) {
             return;
         }
@@ -165,7 +165,7 @@ public class PolicyVerificationInFaultInterceptorTest extends Assert {
         }
         EasyMock.expect(endpoint.getEndpointInfo()).andReturn(ei);
         
-        EasyMock.expect(exchange.get(Bus.class)).andReturn(bus);
+        EasyMock.expect(exchange.getBus()).andReturn(bus);
         if (setupPolicyEngine && null == engine) {
             engine = control.createMock(PolicyEngine.class);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptorTest.java b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptorTest.java
index 29a8317..c4e9939 100644
--- a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptorTest.java
+++ b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyVerificationInInterceptorTest.java
@@ -143,7 +143,7 @@ public class PolicyVerificationInInterceptorTest extends Assert {
             return;
         }
         
-        EasyMock.expect(exchange.get(Bus.class)).andReturn(bus).anyTimes();
+        EasyMock.expect(exchange.getBus()).andReturn(bus).anyTimes();
         EasyMock.expect(message.getExchange()).andReturn(exchange);
         if (setupBindingOperationInfo && null == boi) {
             boi = control.createMock(BindingOperationInfo.class);
@@ -155,7 +155,7 @@ public class PolicyVerificationInInterceptorTest extends Assert {
         if (setupEndpoint && null == endpoint) {
             endpoint = control.createMock(Endpoint.class);
         }
-        EasyMock.expect(exchange.get(Endpoint.class)).andReturn(endpoint);
+        EasyMock.expect(exchange.getEndpoint()).andReturn(endpoint);
         if (!setupEndpoint) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
index b14ced7..4c02e88 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
@@ -85,7 +85,7 @@ public abstract class AbstractRMInterceptor<T extends Message> extends AbstractP
             
             // log the fault as it may not be reported back to the client
             
-            Endpoint e = msg.getExchange().get(Endpoint.class);
+            Endpoint e = msg.getExchange().getEndpoint();
             Binding b = null;
             if (null != e) {
                 b = e.getBinding();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
index 77c9c49..178a63c 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Destination.java
@@ -223,7 +223,7 @@ public class Destination extends AbstractEndpoint {
     }
     
     private static Message createMessage(Exchange exchange) {
-        Endpoint ep = exchange.get(Endpoint.class);
+        Endpoint ep = exchange.getEndpoint();
         Message msg = null;
         if (ep != null) {
             msg = new MessageImpl();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/InternalContextUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/InternalContextUtils.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/InternalContextUtils.java
index eac5662..c490615 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/InternalContextUtils.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/InternalContextUtils.java
@@ -78,7 +78,7 @@ final class InternalContextUtils {
             if (ContextUtils.isNoneAddress(reference)) {
                 return null;
             }
-            Bus bus = inMessage.getExchange().get(Bus.class);
+            Bus bus = inMessage.getExchange().getBus();
             //this is a response targeting a decoupled endpoint.   Treat it as a oneway so
             //we don't wait for a response.
             inMessage.getExchange().setOneWay(true);
@@ -165,7 +165,7 @@ final class InternalContextUtils {
                         MessageUtils.isTrue(inMessage.getContextualProperty(Message.ROBUST_ONEWAY));
                     
                     if (robust) {
-                        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
+                        BindingOperationInfo boi = exchange.getBindingOperationInfo();
                         // insert the executor in the exchange to fool the OneWayProcessorInterceptor
                         exchange.put(Executor.class, getExecutor(inMessage));
                         // pause dispatch on current thread and resume...
@@ -185,7 +185,7 @@ final class InternalContextUtils {
                     partialResponse.setInterceptorChain(chain);
                     exchange.put(ConduitSelector.class,
                                  new PreexistingConduitSelector(backChannel,
-                                                                exchange.get(Endpoint.class)));
+                                                                exchange.getEndpoint()));
 
                     if (chain != null && !chain.doIntercept(partialResponse) 
                         && partialResponse.getContent(Exception.class) != null) {
@@ -220,7 +220,7 @@ final class InternalContextUtils {
 
     private static Destination createDecoupledDestination(
         Exchange exchange, final EndpointReferenceType reference) {
-        final EndpointInfo ei = exchange.get(Endpoint.class).getEndpointInfo();
+        final EndpointInfo ei = exchange.getEndpoint().getEndpointInfo();
         return new DecoupledDestination(ei, reference);
     }
     
@@ -250,12 +250,12 @@ final class InternalContextUtils {
      * @return
      */
     private static Executor getExecutor(final Message message) {
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         Executor executor = endpoint.getService().getExecutor();
         
         if (executor == null || SynchronousExecutor.isA(executor)) {
             // need true asynchrony
-            Bus bus = message.getExchange().get(Bus.class);
+            Bus bus = message.getExchange().getBus();
             if (bus != null) {
                 WorkQueueManager workQueueManager =
                     bus.getExtension(WorkQueueManager.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
index 2c5e832..6fc3921 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
@@ -341,7 +341,6 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor<Message>  {
         
         newex.put(BindingInfo.class, bi);
         newex.put(BindingOperationInfo.class, boi);
-        newex.put(OperationInfo.class, boi.getOperationInfo());
         
         msg.setExchange(newex);
         newex.setOutMessage(msg);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8ab75c2d/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
index bf68119..7e6e0ff 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
@@ -53,9 +53,6 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.InterfaceInfo;
-import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.ContextUtils;
@@ -312,7 +309,7 @@ public class RMManager {
     // The real stuff ...
 
     public RMEndpoint getReliableEndpoint(Message message) throws RMException {
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         QName name = endpoint.getEndpointInfo().getName();
         if (LOG.isLoggable(Level.FINE)) {
             LOG.fine("Getting RMEndpoint for endpoint with info: " + name);
@@ -380,7 +377,7 @@ public class RMManager {
                     AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false, false);
                     replyTo = maps.getReplyTo();
                 }
-                Endpoint ei = message.getExchange().get(Endpoint.class);
+                Endpoint ei = message.getExchange().getEndpoint();
                 org.apache.cxf.transport.Destination dest 
                     = ei == null ? null : ei.getEndpointInfo()
                         .getProperty(MAPAggregator.DECOUPLED_DESTINATION, 
@@ -437,7 +434,7 @@ public class RMManager {
                 to = RMUtils.createReference(maps.getTo().getValue());
                 acksTo = maps.getReplyTo();
                 if (RMUtils.getAddressingConstants().getNoneURI().equals(acksTo.getAddress().getValue())) {
-                    Endpoint ei = message.getExchange().get(Endpoint.class);
+                    Endpoint ei = message.getExchange().getEndpoint();
                     org.apache.cxf.transport.Destination dest 
                         = ei == null ? null : ei.getEndpointInfo()
                                 .getProperty(MAPAggregator.DECOUPLED_DESTINATION, 
@@ -590,12 +587,7 @@ public class RMManager {
             }
             exchange.put(Endpoint.class, endpoint);
             exchange.put(Service.class, endpoint.getService());
-            if (endpoint.getEndpointInfo().getService() != null) {
-                exchange.put(ServiceInfo.class, endpoint.getEndpointInfo().getService());
-                exchange.put(InterfaceInfo.class, endpoint.getEndpointInfo().getService().getInterface());
-            }
             exchange.put(Binding.class, endpoint.getBinding());
-            exchange.put(BindingInfo.class, endpoint.getEndpointInfo().getBinding());
             exchange.put(Bus.class, bus);
             
             SequenceType st = new SequenceType();


Mime
View raw message