cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r916080 [1/2] - in /cxf/trunk: api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/message/ api/src/main/java/org/apache/cxf/service/model/ common/common/src/main/java/org/apache/cxf/common/util/ rt/bindings/soap/src...
Date Thu, 25 Feb 2010 01:22:37 GMT
Author: dkulp
Date: Thu Feb 25 01:22:34 2010
New Revision: 916080

URL: http://svn.apache.org/viewvc?rev=916080&view=rev
Log:
Bunch of minor tweeks to help performance and scalability

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/Exchange.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/ExchangeImpl.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageImpl.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageUtils.java
    cxf/trunk/api/src/main/java/org/apache/cxf/message/StringMapImpl.java
    cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
    cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
    cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ModCountCopyOnWriteArrayList.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/HeaderUtil.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapMessage.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
    cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/AbstractBindingImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/DefaultBindingImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
    cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationOutInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/RoundTripTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationUsingAddNumbersTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopWithJMSTest.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java Thu Feb 25 01:22:34 2010
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import java.util.logging.Logger;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.interceptor.Fault;
@@ -67,8 +66,8 @@
             EndpointInfo ei = endpoint.getEndpointInfo();
             String transportID = ei.getTransportId();
             try {
-                ConduitInitiatorManager conduitInitiatorMgr =
-                    getBus(exchange).getExtension(ConduitInitiatorManager.class);
+                ConduitInitiatorManager conduitInitiatorMgr = exchange.getBus()
+                    .getExtension(ConduitInitiatorManager.class);
                 if (conduitInitiatorMgr != null) {
                     ConduitInitiator conduitInitiator =
                         conduitInitiatorMgr.getConduitInitiator(transportID);
@@ -122,17 +121,6 @@
     }
     
     /**
-     * Get the associated Bus instance from the exchange.
-     * 
-     * @param exchange the current exchange
-     * @return the Bus instance
-     */
-    private Bus getBus(Exchange exchange) {
-        return exchange.get(Bus.class);
-    }
-    
-    
-    /**
      * Called on completion of the MEP for which the Conduit was required.
      * 
      * @param exchange represents the completed MEP

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/AbstractWrappedMessage.java Thu Feb 25 01:22:34 2010
@@ -162,5 +162,13 @@
 
     public Object getContextualProperty(String key) {
         return message.getContextualProperty(key);
-    }       
+    }  
+    public void setContextualProperty(String key, Object v) {
+        message.setContextualProperty(key, v);
+    }  
+    
+    public void resetContextCache() {
+        message.resetContextCache();
+    }
+    
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/Exchange.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/Exchange.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/Exchange.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/Exchange.java Thu Feb 25 01:22:34 2010
@@ -19,6 +19,11 @@
 
 package org.apache.cxf.message;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.Binding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.Session;
@@ -100,4 +105,11 @@
      * {@inheritDoc}
      */
     void clear();
+    
+    Bus getBus();
+    Service getService();
+    Endpoint getEndpoint();
+    Binding getBinding();
+    BindingOperationInfo getBindingOperationInfo();
+    
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/ExchangeImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/ExchangeImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/ExchangeImpl.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/ExchangeImpl.java Thu Feb 25 01:22:34 2010
@@ -19,15 +19,19 @@
 
 package org.apache.cxf.message;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.Binding;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.PreexistingConduitSelector;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.Session;
 
 public class ExchangeImpl extends StringMapImpl implements Exchange {
-
+    
     private Destination destination;
     private boolean oneWay;
     private boolean synchronous = true;
@@ -39,6 +43,80 @@
     
     private Session session;
     
+    private Bus bus;
+    private Endpoint endpoint;
+    private Service service;
+    private Binding binding;
+    private BindingOperationInfo bindingOp;
+    
+
+    /*
+    public <T> T get(Class<T> key) { 
+        if (key == Bus.class) {
+            return (T)bus;
+        } else if (key == Service.class) {
+            return (T)service;
+        } else if (key == Endpoint.class) {
+            return (T)endpoint;
+        } else if (key == BindingOperationInfo.class) {
+            return (T)bindingOp;
+        } else if (key == Binding.class) {
+            return (T)binding;
+        } else if (key == OperationInfo.class) {
+            return super.get(key);
+        }
+        return super.get(key);
+    }
+    */
+    private void resetContextCaches() {
+        if (inMessage != null) {
+            inMessage.resetContextCache();
+        }
+        if (outMessage != null) {
+            outMessage.resetContextCache();
+        }
+        if (inFaultMessage != null) {
+            inFaultMessage.resetContextCache();
+        }
+        if (outFaultMessage != null) {
+            outFaultMessage.resetContextCache();
+        }
+    }
+
+    public <T> void put(Class<T> key, T value) {
+        super.put(key, value);
+        if (key == Bus.class) {
+            resetContextCaches();
+            bus = (Bus)value;
+        } else if (key == Endpoint.class) {
+            resetContextCaches();
+            endpoint = (Endpoint)value;
+        } else if (key == Service.class) {
+            resetContextCaches();
+            service = (Service)value;
+        } else if (key == BindingOperationInfo.class) {
+            bindingOp = (BindingOperationInfo)value;
+        } else if (key == Binding.class) {
+            binding = (Binding)value;
+        }
+    }
+    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);
+        }
+        return super.put(key, value);
+    }
+
+    
     public Destination getDestination() {
         return destination;
     }
@@ -124,6 +202,7 @@
     
     public void clear() {
         super.clear();
+        resetContextCaches();
         destination = null;
         oneWay = false;
         inMessage = null;
@@ -131,5 +210,26 @@
         inFaultMessage = null;
         outFaultMessage = null;
         session = null;
+        bus = null;
+    }
+
+    public Bus getBus() {
+        return bus;
+    }
+
+    public Endpoint getEndpoint() {
+        return endpoint;
+    }
+
+    public Service getService() {
+        return service;
+    }
+
+    public Binding getBinding() {
+        return binding;
+    }
+
+    public BindingOperationInfo getBindingOperationInfo() {
+        return bindingOp;
     }
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java Thu Feb 25 01:22:34 2010
@@ -188,4 +188,7 @@
      * @return the property's value
      */
     Object getContextualProperty(String key);   
+    
+    void resetContextCache();
+    void setContextualProperty(String key, Object v);
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageImpl.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageImpl.java Thu Feb 25 01:22:34 2010
@@ -19,37 +19,90 @@
 
 package org.apache.cxf.message;
 
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.IdentityHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.w3c.dom.Node;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.InterceptorChain;
+import org.apache.cxf.io.DelegatingInputStream;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.Destination;
 
 public class MessageImpl extends StringMapImpl implements Message {
-    static int count;
+    private static final Class<?> DEFAULT_CONTENTS[];
+    private static final int DEFAULT_CONTENTS_LENGTH;
+    
+    static {
+        Class<?> tmps[];
+        
+        try {
+            //if SAAJ is there, give it a slot
+            Class<?> cls = Class.forName("javax.xml.soap.SOAPMessage");
+            tmps = new Class<?>[] {
+                XMLStreamReader.class, XMLStreamWriter.class,
+                InputStream.class, OutputStream.class,
+                List.class, Exception.class, Node.class, DelegatingInputStream.class,
+                cls
+            };
+        } catch (Throwable e) {
+            tmps = new Class<?>[] {
+                XMLStreamReader.class, XMLStreamWriter.class,
+                InputStream.class, OutputStream.class,
+                List.class, Exception.class, Node.class, DelegatingInputStream.class
+            };
+        }
+        DEFAULT_CONTENTS = tmps;
+        DEFAULT_CONTENTS_LENGTH = tmps.length;
+    }
+    
     
-    private Collection<Attachment> attachments;
     private Exchange exchange;
     private String id;
     private InterceptorChain interceptorChain;
-    private Map<Class<?>, Object> contents = new IdentityHashMap<Class<?>, Object>(6);
+    
+    private Object[] defaultContents = new Object[DEFAULT_CONTENTS_LENGTH];
+    private Map<Class<?>, Object> contents;
+    private Map<String, Object> contextCache;
+    
     
     public MessageImpl() {
         //nothing
     }
+    public MessageImpl(Message m) {
+        super(m);
+        if (m instanceof MessageImpl) {
+            MessageImpl impl = (MessageImpl)m;
+            exchange = impl.getExchange();
+            id = impl.id;
+            interceptorChain = impl.interceptorChain;
+            defaultContents = impl.defaultContents;
+            contents = impl.contents;
+            contextCache = impl.contextCache;
+        } else {
+            throw new RuntimeException("Not a MessageImpl! " + m.getClass());
+        }
+    }
     
     public Collection<Attachment> getAttachments() {
-        return attachments;
+        return CastUtils.cast((Collection<?>)get(ATTACHMENTS));
     }
 
     public void setAttachments(Collection<Attachment> attachments) {
-        this.attachments = attachments;
         put(ATTACHMENTS, attachments);
     }
 
@@ -74,20 +127,55 @@
         return this.interceptorChain;
     }
 
+    @SuppressWarnings("unchecked")
     public <T> T getContent(Class<T> format) {
-        return format.cast(contents.get(format));
+        for (int x = 0; x < DEFAULT_CONTENTS_LENGTH; x++) {
+            if (DEFAULT_CONTENTS[x] == format) {
+                return (T)defaultContents[x];
+            }
+        }
+        return contents == null ? null : (T)contents.get(format);
     }
 
     public <T> void setContent(Class<T> format, Object content) {
+        for (int x = 0; x < DEFAULT_CONTENTS_LENGTH; x++) {
+            if (DEFAULT_CONTENTS[x] == format) {
+                defaultContents[x] = content;
+                return;
+            }
+        }
+        if (contents == null) {
+            contents = new IdentityHashMap<Class<?>, Object>(6);
+        }
         contents.put(format, content);
     }
     
     public <T> void removeContent(Class<T> format) {
-        contents.remove(format);
+        for (int x = 0; x < DEFAULT_CONTENTS_LENGTH; x++) {
+            if (DEFAULT_CONTENTS[x] == format) {
+                defaultContents[x] = null;
+                return;
+            }
+        }
+        if (contents != null) {
+            contents.remove(format);
+        }
     }
 
     public Set<Class<?>> getContentFormats() {
-        return contents.keySet();
+        
+        Set<Class<?>> c;
+        if (contents == null) {
+            c = new HashSet<Class<?>>();
+        } else {
+            c = new HashSet<Class<?>>(contents.keySet());
+        }
+        for (int x = 0; x < DEFAULT_CONTENTS_LENGTH; x++) {
+            if (defaultContents[x] != null) {
+                c.add(DEFAULT_CONTENTS[x]);
+            }
+        }
+        return c;
     }
 
     public void setDestination(Destination d) {
@@ -105,56 +193,67 @@
     public void setInterceptorChain(InterceptorChain ic) {
         this.interceptorChain = ic;
     }
-
-    public Object getContextualProperty(String key) {
-        Object val = get(key);
-        
-        Exchange ex = getExchange();
-        if (val == null && ex != null) {
-            val = ex.get(key);
+    public Object put(String key, Object value) {
+        if (contextCache != null) {
+            contextCache.put(key, value);
         }
-        
-        if (val == null) {
-            OperationInfo ep = get(OperationInfo.class); 
-            if (ep != null) {
-                val = ep.getProperty(key);
-            }
+        return super.put(key, value);
+    }
+    public Object getContextualProperty(String key) {
+        if (contextCache == null) {
+            calcContextCache();
         }
-        
-        if (val == null && ex != null) {
-            Endpoint ep = ex.get(Endpoint.class); 
-            if (ep != null) {
-                val = ep.get(key);
-                
-                if (val == null) {
-                    val = ep.getEndpointInfo().getProperty(key);
-                }
-
-                if (val == null) {
-                    val = ep.getEndpointInfo().getBinding().getProperty(key);
+        return contextCache.get(key);
+    }
+    
+    private void calcContextCache() {
+        Map<String, Object> o = new HashMap<String, Object>() {
+            public void putAll(Map<? extends String, ? extends Object> m) {
+                if (m != null) {
+                    super.putAll(m);
                 }
-
             }
-            if (val == null) {
-                Service sv = ex.get(Service.class); 
-                if (sv != null) {
-                    val = sv.get(key);
-                }
-                if (val == null) {
-                    Bus bus = ex.get(Bus.class);
-                    if (bus != null) {
-                        val = bus.getProperty(key);
-                    }
+        };
+        Exchange ex = getExchange();
+        if (ex != null) {
+            Bus b = ex.getBus();
+            if (b != null) {
+                o.putAll(b.getProperties());
+            }
+            Service sv = ex.getService(); 
+            if (sv != null) {
+                o.putAll(sv);
+            }
+            Endpoint ep = ex.getEndpoint(); 
+            if (ep != null) {
+                EndpointInfo ei = ep.getEndpointInfo();
+                if (ei != null) {
+                    o.putAll(ep.getEndpointInfo().getBinding().getProperties());
+                    o.putAll(ep.getEndpointInfo().getProperties());
                 }
+                o.putAll(ep);
             }
         }
-        
-        return val;
+        o.putAll(ex);
+        o.putAll(this);
+        contextCache = o;
     }
-    
     public static void copyContent(Message m1, Message m2) {
         for (Class<?> c : m1.getContentFormats()) {
             m2.setContent(c, m1.getContent(c));
         }
     }
+
+    public void resetContextCache() {
+        if (contextCache != null) {
+            contextCache = null;
+        }
+    }
+
+    @Override
+    public void setContextualProperty(String key, Object v) {
+        if (contextCache != null && !containsKey(key)) {
+            contextCache.put(key, v);
+        }
+    }
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageUtils.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageUtils.java Thu Feb 25 01:22:34 2010
@@ -130,12 +130,15 @@
      * Returns true if the underlying content format is a W3C DOM or a SAAJ message.
      */
     public static boolean isDOMPresent(Message m) {
+        return m.getContent(Node.class) != null;
+        /*
         for (Class c : m.getContentFormats()) {
             if (c.equals(Node.class) || c.getName().equals("javax.xml.soap.SOAPMessage")) {
                 return true;
             }   
         }
         return false;
+        */
     }
 
 }

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/message/StringMapImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/message/StringMapImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/message/StringMapImpl.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/message/StringMapImpl.java Thu Feb 25 01:22:34 2010
@@ -20,6 +20,7 @@
 package org.apache.cxf.message;
 
 import java.util.HashMap;
+import java.util.Map;
 
 /**
  * A variation on HashMap which allows lookup by Class, via the string
@@ -29,8 +30,15 @@
     extends HashMap<String, Object> 
     implements StringMap {
     
+    public StringMapImpl() {
+    }
+    public StringMapImpl(Map<String, Object> i) {
+        super(i);
+    }
+    
+    @SuppressWarnings("unchecked")
     public <T> T get(Class<T> key) {
-        return key.cast(get(key.getName()));
+        return (T)get(key.getName());
     }
 
     public <T> void put(Class<T> key, T value) {

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java Thu Feb 25 01:22:34 2010
@@ -213,9 +213,12 @@
      * @return all message parts.
      */
     public List<MessagePartInfo> getMessageParts() {
+        if (outOfBandParts == null) {
+            return new ArrayList<MessagePartInfo>(messageParts.values());
+        }
         List<MessagePartInfo> parts = new ArrayList<MessagePartInfo>(messageParts.values());
-        parts.addAll(getOutOfBandParts());
-        return Collections.unmodifiableList(parts);
+        parts.addAll(outOfBandParts);
+        return parts;
     }
     public List<MessagePartInfo> getOutOfBandParts() {
         if (outOfBandParts == null) {

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java Thu Feb 25 01:22:34 2010
@@ -41,7 +41,9 @@
     public void setDocumentation(String s) {
         documentation = s;
     }
-    
+    public Map<String, Object> getProperties() {
+        return propertyMap.get();
+    }
     public Object getProperty(String name) {
         if (null == propertyMap.get()) {
             return null;

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java Thu Feb 25 01:22:34 2010
@@ -42,7 +42,7 @@
     }
 
     public static Service getService(Exchange exchange) {
-        return exchange.get(Service.class);
+        return exchange.getService();
     }
     
     public static String getTargetNamespace(Exchange exchange) {

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ModCountCopyOnWriteArrayList.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ModCountCopyOnWriteArrayList.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ModCountCopyOnWriteArrayList.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ModCountCopyOnWriteArrayList.java Thu Feb 25 01:22:34 2010
@@ -21,104 +21,129 @@
 
 import java.util.Collection;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicInteger;
 
 public final class ModCountCopyOnWriteArrayList<T> extends CopyOnWriteArrayList<T> {
-    int modCount;
+    AtomicInteger modCount = new AtomicInteger();
     
     public ModCountCopyOnWriteArrayList() {
         super();
     }
     public ModCountCopyOnWriteArrayList(Collection<? extends T> c) {
-        super();
-        synchronized (c) {
-            addAll(c);
-            if (c instanceof ModCountCopyOnWriteArrayList) {
-                modCount = ((ModCountCopyOnWriteArrayList)c).getModCount();
-            }
+        super(c);
+        if (c instanceof ModCountCopyOnWriteArrayList) {
+            modCount.set(((ModCountCopyOnWriteArrayList)c).getModCount());
         }
     }
     
-    public synchronized int getModCount() {
-        return modCount;
+    public int getModCount() {
+        return modCount.get();
     }
     
-    public synchronized void setModCount(int i) {
-        modCount = i;
+    public void setModCount(int i) {
+        modCount.set(i);
     }
     
     @Override
-    public synchronized void add(int index, T element) {
-        ++modCount;
+    public void add(int index, T element) {
         super.add(index, element);
+        modCount.incrementAndGet();
     }
 
     @Override
-    public synchronized boolean add(T element) {
-        ++modCount;
-        return super.add(element);
+    public boolean add(T element) {
+        if (super.add(element)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized boolean addAll(Collection<? extends T> c) {
-        ++modCount;
-        return super.addAll(c);
+    public boolean addAll(Collection<? extends T> c) {
+        if (super.addAll(c)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized boolean addAll(int index, Collection<? extends T> c) {
-        ++modCount;
-        return super.addAll(index, c);
+    public boolean addAll(int index, Collection<? extends T> c) {
+        if (super.addAll(index, c)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized int addAllAbsent(Collection<? extends T> c) {
-        ++modCount;
-        return super.addAllAbsent(c);
+    public int addAllAbsent(Collection<? extends T> c) {
+        int i = super.addAllAbsent(c);
+        if (i > 0) {
+            modCount.incrementAndGet();
+        }
+        return i;
     }
 
     @Override
-    public synchronized boolean addIfAbsent(T element) {
-        ++modCount;
-        return super.addIfAbsent(element);
+    public boolean addIfAbsent(T element) {
+        if (super.addIfAbsent(element)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized void clear() {
-        ++modCount;
+    public void clear() {
         super.clear();
+        modCount.incrementAndGet();
     }
 
     @Override
-    public synchronized T remove(int index) {
-        ++modCount;
-        return super.remove(index);
+    public T remove(int index) {
+        T t = super.remove(index);
+        if (t != null) {
+            modCount.incrementAndGet();
+        }
+        return t;
     }
 
     @Override
-    public synchronized boolean remove(Object o) {
-        ++modCount;
-        return super.remove(o);
+    public boolean remove(Object o) {
+        if (super.remove(o)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized boolean removeAll(Collection c) {
-        ++modCount;
-        return super.removeAll(c);
+    public boolean removeAll(Collection c) {
+        if (super.removeAll(c)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
 
     @Override
-    public synchronized boolean retainAll(Collection c) {
-        ++modCount;
-        return super.retainAll(c);
+    public boolean retainAll(Collection c) {
+        if (super.retainAll(c)) {
+            modCount.incrementAndGet();
+            return true;
+        }
+        return false;
     }
     
-    public synchronized int hashCode() {
-        return super.hashCode() + modCount;
+    public int hashCode() {
+        return super.hashCode() + modCount.get();
     }
     
-    public synchronized boolean equals(Object o) {
+    public boolean equals(Object o) {
         if (o instanceof ModCountCopyOnWriteArrayList) {
-            return super.equals(o) && modCount == ((ModCountCopyOnWriteArrayList)o).getModCount();
+            return super.equals(o) && modCount.get() == ((ModCountCopyOnWriteArrayList)o).getModCount();
         }
         return false;
     }

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/HeaderUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/HeaderUtil.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/HeaderUtil.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/HeaderUtil.java Thu Feb 25 01:22:34 2010
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.binding.soap;
 
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -75,17 +76,15 @@
     }
 
     public static Set<QName> getHeaderQNameInOperationParam(SoapMessage soapMessage) {
-        Set<QName> headers = new HashSet<QName>();
-        BindingOperationInfo bop = soapMessage.getExchange()
-            .get(BindingOperationInfo.class);
+        BindingOperationInfo bop = soapMessage.getExchange().getBindingOperationInfo();
         if (bop != null) {
             if (bop.getInput() != null) {
-                headers.addAll(getHeaderParts(bop.getInput()));
+                return getHeaderParts(bop.getInput());
             }
             if (bop.getOutput() != null) {
-                headers.addAll(getHeaderParts(bop.getOutput()));
+                return getHeaderParts(bop.getOutput());
             }
         }
-        return headers;
+        return Collections.emptySet();
     }
 }

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java Thu Feb 25 01:22:34 2010
@@ -22,7 +22,6 @@
 import org.apache.cxf.binding.Binding;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.model.BindingInfo;
 
 public class SoapBinding extends AbstractBasicInterceptorProvider implements Binding {
@@ -52,7 +51,9 @@
     }
     
     public Message createMessage() {
-        return createMessage(new MessageImpl());
+        SoapMessage soapMessage = new SoapMessage(version);
+        soapMessage.put(Message.CONTENT_TYPE, soapMessage.getVersion().getContentType());
+        return soapMessage;
     }
 
     public Message createMessage(Message m) {

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapMessage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapMessage.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapMessage.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapMessage.java Thu Feb 25 01:22:34 2010
@@ -27,14 +27,19 @@
 
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.message.AbstractWrappedMessage;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 
-public class SoapMessage extends AbstractWrappedMessage {
-    private SoapVersion version = Soap11.getInstance();
+public class SoapMessage extends MessageImpl {
+    private SoapVersion version;
 
     public SoapMessage(Message message) {
         super(message);
+        version = Soap11.getInstance();
+    }
+    public SoapMessage(SoapVersion ver) {
+        super();
+        version = ver;
     }
 
     public SoapVersion getVersion() {

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java Thu Feb 25 01:22:34 2010
@@ -60,6 +60,12 @@
     }
 
     public void handleMessage(SoapMessage soapMessage) {
+        Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage);
+
+        if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) {
+            return;
+        }
+        
         SoapVersion soapVersion = soapMessage.getVersion();              
         Set<Header> mustUnderstandHeaders = new HashSet<Header>();
         Set<URI> serviceRoles = new HashSet<URI>();
@@ -67,7 +73,7 @@
         Set<Header> ultimateReceiverHeaders = new HashSet<Header>();
         Set<QName> mustUnderstandQNames = new HashSet<QName>();
 
-        initServiceSideInfo(mustUnderstandQNames, soapMessage, serviceRoles);
+        initServiceSideInfo(mustUnderstandQNames, soapMessage, serviceRoles, paramHeaders);
         buildMustUnderstandHeaders(mustUnderstandHeaders, soapMessage,
                                    serviceRoles, ultimateReceiverHeaders);
         
@@ -126,9 +132,7 @@
         }
     }
     private void initServiceSideInfo(Set<QName> mustUnderstandQNames, SoapMessage soapMessage,
-                    Set<URI> serviceRoles) {
-
-        Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage);
+                    Set<URI> serviceRoles, Set<QName> paramHeaders) {
 
         if (paramHeaders != null) {
             mustUnderstandQNames.addAll(paramHeaders);

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java Thu Feb 25 01:22:34 2010
@@ -65,7 +65,7 @@
             parameters = new MessageContentsList();
         }
 
-        BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
+        BindingOperationInfo bop = exchange.getBindingOperationInfo();
         if (null == bop) {
             return;
         }

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -97,7 +97,7 @@
     }
     
     private void setSoapAction(SoapMessage message) {
-        BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo boi = message.getExchange().getBindingOperationInfo();
         
         // The soap action is set on the wrapped operation.
         if (boi != null && boi.isUnwrapped()) {

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -112,6 +112,7 @@
             } else {
                 StaxUtils.copy(node, new W3CDOMStreamWriter(part));
             }
+            message.setContent(Node.class, soapMessage.getSOAPPart());
 
             Collection<Attachment> atts = message.getAttachments();
             if (atts != null) {

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -36,6 +36,8 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.w3c.dom.Node;
+
 
 import org.apache.cxf.attachment.AttachmentImpl;
 import org.apache.cxf.binding.soap.Soap11;
@@ -124,6 +126,7 @@
                 // Replace stax writer with DomStreamWriter
                 message.setContent(XMLStreamWriter.class, writer);
                 message.setContent(SOAPMessage.class, soapMessage);
+                message.setContent(Node.class, soapMessage.getSOAPPart());
                 
                 
             } catch (SOAPException e) {

Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java (original)
+++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java Thu Feb 25 01:22:34 2010
@@ -64,18 +64,18 @@
         soapMessage = (SoapMessage) sb.createMessage(soapMessage);
         soapMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
         i.handleMessage(soapMessage);
-        String ct = (String) message.get(Message.CONTENT_TYPE);
+        String ct = (String) soapMessage.get(Message.CONTENT_TYPE);
         assertEquals("application/soap+xml", ct);
         
         BindingOperationInfo bop = createBindingOperation();
  
-        message.getExchange().put(BindingOperationInfo.class, bop);
+        soapMessage.getExchange().put(BindingOperationInfo.class, bop);
         SoapOperationInfo soapInfo = new SoapOperationInfo();
         soapInfo.setAction("foo");
         bop.addExtensor(soapInfo);
         
         i.handleMessage(soapMessage);
-        ct = (String) message.get(Message.CONTENT_TYPE);
+        ct = (String) soapMessage.get(Message.CONTENT_TYPE);
         assertEquals("application/soap+xml; action=\"foo\"", ct);
     }
 

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java Thu Feb 25 01:22:34 2010
@@ -19,10 +19,9 @@
 
 package org.apache.cxf.clustering;
 
-import java.io.IOException;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -64,7 +63,7 @@
      */
     public FailoverTargetSelector(Conduit c) {
         super(c);
-        inProgress = new HashMap<InvocationKey, InvocationContext>();
+        inProgress = new ConcurrentHashMap<InvocationKey, InvocationContext>();
     }
     
     /**
@@ -78,7 +77,7 @@
         if (!inProgress.containsKey(key)) {
             Endpoint endpoint = exchange.get(Endpoint.class);
             BindingOperationInfo bindingOperationInfo =
-                exchange.get(BindingOperationInfo.class);
+                exchange.getBindingOperationInfo();
             Object[] params = message.getContent(List.class).toArray();
             Map<String, Object> context =
                 CastUtils.cast((Map)message.get(Message.INVOCATION_CONTEXT));
@@ -197,18 +196,18 @@
         Exception ex = outMessage.get(Exception.class) != null
                        ? outMessage.get(Exception.class)
                        : exchange.get(Exception.class);
-        getLogger().log(Level.INFO,
+        getLogger().log(Level.FINE,
                         "CHECK_LAST_INVOKE_FAILED",
                         new Object[] {ex != null});
         Throwable curr = ex;
         boolean failover = false;
         while (curr != null) {
-            getLogger().log(Level.WARNING,
-                            "CHECK_FAILURE_IN_TRANSPORT",
-                            new Object[] {ex, curr instanceof IOException});
             failover = curr instanceof java.io.IOException;
             curr = curr.getCause();
         }
+        getLogger().log(Level.INFO,
+                        "CHECK_FAILURE_IN_TRANSPORT",
+                        new Object[] {ex, failover});
         return failover;
     }
     

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Thu Feb 25 01:22:34 2010
@@ -596,7 +596,7 @@
 
     public void onMessage(Message message) {
 
-        Endpoint endpoint = message.getExchange().get(Endpoint.class);
+        Endpoint endpoint = message.getExchange().getEndpoint();
         if (endpoint == null) {
             // in this case correlation will occur outside the transport,
             // however there's a possibility that the endpoint may have been
@@ -859,19 +859,17 @@
         return getConduitSelector(null);
     }
 
-    protected final synchronized ConduitSelector getConduitSelector(
+    protected final ConduitSelector getConduitSelector(
         ConduitSelector override
     ) {
         if (null == conduitSelector) {
-            setConduitSelector(override != null
-                               ? override
-                               : new UpfrontConduitSelector());
+            setConduitSelector(override);
         }
         return conduitSelector;
     }
 
-    public final void setConduitSelector(ConduitSelector selector) {
-        conduitSelector = selector;
+    public final synchronized void setConduitSelector(ConduitSelector selector) {
+        conduitSelector = selector == null ? new UpfrontConduitSelector() : selector;
     }
 
     private boolean isPartialResponse(Message in) {

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java Thu Feb 25 01:22:34 2010
@@ -88,7 +88,7 @@
                                                                    BUNDLE, service.getName()));
         }
         dataReader.setAttachments(message.getAttachments());
-        dataReader.setProperty(DataReader.ENDPOINT, message.getExchange().get(Endpoint.class));
+        dataReader.setProperty(DataReader.ENDPOINT, message.getExchange().getEndpoint());
         dataReader.setProperty(Message.class.getName(), message);
         setSchemaInMessage(service, message, dataReader);   
         return dataReader;
@@ -208,7 +208,7 @@
         QName interfaceQName = si.getInterface().getName();
         message.put(Message.WSDL_INTERFACE, interfaceQName);
 
-        EndpointInfo endpointInfo = ex.get(Endpoint.class).getEndpointInfo();
+        EndpointInfo endpointInfo = ex.getEndpoint().getEndpointInfo();
         QName portQName = endpointInfo.getName();
         message.put(Message.WSDL_PORT, portQName);
 

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java Thu Feb 25 01:22:34 2010
@@ -30,7 +30,6 @@
 import javax.xml.validation.Schema;
 
 import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -68,7 +67,7 @@
                               List<MessagePartInfo> parts) {
         OutputStream out = message.getContent(OutputStream.class);
         XMLStreamWriter origXmlWriter = message.getContent(XMLStreamWriter.class);
-        Service service = exchange.get(Service.class);
+        Service service = exchange.getService();
         XMLStreamWriter xmlWriter = origXmlWriter;
         CachingXmlEventWriter cache = null;
         
@@ -167,7 +166,7 @@
         }
         
         writer.setAttachments(atts);
-        writer.setProperty(DataWriter.ENDPOINT, message.getExchange().get(Endpoint.class));
+        writer.setProperty(DataWriter.ENDPOINT, message.getExchange().getEndpoint());
         writer.setProperty(Message.class.getName(), message);
         
         setSchemaOutMessage(service, message, writer);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -67,7 +67,7 @@
         MessageContentsList parameters = new MessageContentsList();
 
         Exchange exchange = message.getExchange();
-        BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
+        BindingOperationInfo bop = exchange.getBindingOperationInfo();
 
         boolean client = isRequestor(message);
 

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -51,7 +51,7 @@
         return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
     }
 
-    private synchronized StAXDocumentParser getParser(InputStream in) {
+    private StAXDocumentParser getParser(InputStream in) {
         StAXDocumentParser parser = new StAXDocumentParser(in);
         parser.setStringInterning(true);
         parser.setForceStreamClose(true);
@@ -60,7 +60,7 @@
     }
     
     public void handleMessage(Message message) {
-        if (message.getContentFormats().contains(XMLStreamReader.class)
+        if (message.getContent(XMLStreamReader.class) != null
             || !isHttpVerbSupported(message)) {
             return;
         }
@@ -81,7 +81,7 @@
             if (isRequestor(message)) {
                 //record the fact that is worked so future requests will 
                 //automatically be FI enabled
-                Endpoint ep = message.getExchange().get(Endpoint.class);
+                Endpoint ep = message.getExchange().getEndpoint();
                 ep.put(FIStaxOutInterceptor.FI_ENABLED, Boolean.TRUE);
             }
         }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -57,7 +57,7 @@
     }
 
     public void handleMessage(Message message) {
-        if (isGET(message) || message.getContentFormats().contains(XMLStreamReader.class)) {
+        if (isGET(message) || message.getContent(XMLStreamReader.class) != null) {
             LOG.fine("StaxInInterceptor skipped.");
             return;
         }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -49,7 +49,7 @@
     }
 
     public void handleMessage(Message message) {
-        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
 
         if (bop != null && bop.isUnwrapped()) {
             XMLStreamWriter xmlWriter = message.getContent(XMLStreamWriter.class);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java Thu Feb 25 01:22:34 2010
@@ -74,6 +74,7 @@
             Exchange exchange = message.getExchange();
             if (exchange == null) {
                 exchange = new ExchangeImpl();
+                m.setExchange(exchange);
             }
             exchange.setInMessage(message);
             setExchangeProperties(exchange, message);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java Thu Feb 25 01:22:34 2010
@@ -1401,6 +1401,10 @@
         m.setExchange(e);
         e.setInMessage(m);
         Endpoint endpoint = EasyMock.createMock(Endpoint.class);
+        endpoint.getEndpointInfo();
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
+        endpoint.size();
+        EasyMock.expectLastCall().andReturn(0).anyTimes();
         endpoint.get(ProviderFactory.class.getName());
         EasyMock.expectLastCall().andReturn(factory).anyTimes();
         EasyMock.replay(endpoint);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Thu Feb 25 01:22:34 2010
@@ -460,6 +460,7 @@
         List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain();
         
         hc.addAll(handlerResolver.getHandlerChain(portInfos.get(portName)));
+        jaxwsEndpoint.getJaxwsBinding().setHandlerChain(hc);
 
         LOG.log(Level.FINE, "created proxy", obj);
 

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/AbstractBindingImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/AbstractBindingImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/AbstractBindingImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/AbstractBindingImpl.java Thu Feb 25 01:22:34 2010
@@ -25,15 +25,29 @@
 import javax.xml.ws.Binding;
 import javax.xml.ws.handler.Handler;
 
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
+
 public abstract class AbstractBindingImpl implements Binding {
     private List<Handler> handlerChain = new ArrayList<Handler>();
+    private final JaxWsEndpointImpl endpoint;
+    
+    public AbstractBindingImpl(JaxWsEndpointImpl imp) {
+        endpoint = imp;
+    }
+    
     
     public List<Handler> getHandlerChain() {
-        return handlerChain;
+        //per spec, this should be a copy
+        return new ArrayList<Handler>(handlerChain);
     }
 
     public void setHandlerChain(List<Handler> hc) {
         handlerChain = hc;
+        if (handlerChain == null || handlerChain.isEmpty()) {
+            endpoint.removeHandlerInterceptors();
+        } else {
+            endpoint.addHandlerInterceptors();
+        }
     }
 
     public abstract String getBindingID();

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/DefaultBindingImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/DefaultBindingImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/DefaultBindingImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/DefaultBindingImpl.java Thu Feb 25 01:22:34 2010
@@ -19,7 +19,13 @@
 
 package org.apache.cxf.jaxws.binding;
 
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
+
 public class DefaultBindingImpl extends AbstractBindingImpl {
+    public DefaultBindingImpl(JaxWsEndpointImpl endpoint) {
+        super(endpoint);
+    }
+    
     public String getBindingID() {
         //DefaultBindingImpl should not be used, though JBI binding and
         //some other bindings did not implement their own Binding.

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java Thu Feb 25 01:22:34 2010
@@ -27,11 +27,13 @@
 import javax.xml.ws.http.HTTPBinding;
 
 import org.apache.cxf.jaxws.binding.AbstractBindingImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.service.model.BindingInfo;
 
 public class HTTPBindingImpl extends AbstractBindingImpl implements HTTPBinding {
         
-    public HTTPBindingImpl(BindingInfo sb) {       
+    public HTTPBindingImpl(BindingInfo sb, JaxWsEndpointImpl ep) {
+        super(ep);
     }
     
     public String getBindingID() {

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java Thu Feb 25 01:22:34 2010
@@ -36,6 +36,7 @@
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxws.binding.AbstractBindingImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.BindingInfo;
 
@@ -47,7 +48,8 @@
     private BindingInfo soapBinding;
     private Set<String> roles;
 
-    public SOAPBindingImpl(BindingInfo sb) {
+    public SOAPBindingImpl(BindingInfo sb, JaxWsEndpointImpl endpoint) {
+        super(endpoint);
         soapBinding = sb;  
         addRequiredRoles();
     }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractJAXWSHandlerInterceptor.java Thu Feb 25 01:22:34 2010
@@ -30,7 +30,7 @@
 import org.apache.cxf.service.model.ServiceModelUtil;
 
 public abstract class AbstractJAXWSHandlerInterceptor<T extends Message> extends AbstractPhaseInterceptor<T> {
-    private Binding binding;
+    protected Binding binding;
     
     protected AbstractJAXWSHandlerInterceptor(Binding b, String phase) {
         super(phase);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptor.java Thu Feb 25 01:22:34 2010
@@ -39,6 +39,9 @@
     }
     
     public void handleMessage(T message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         MessageContext context = createProtocolMessageContext(message);
         HandlerChainInvoker invoker = getInvoker(message);
         invoker.setProtocolMessageContext(context);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -37,6 +37,9 @@
     }
 
     public void handleMessage(Message message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         HandlerChainInvoker invoker = getInvoker(message);
         if (invoker.getLogicalHandlers().isEmpty()) {
             return;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -58,6 +58,9 @@
     }
     
     public void handleMessage(Message message) throws Fault {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         HandlerChainInvoker invoker = getInvoker(message);
         if (invoker.getLogicalHandlers().isEmpty()) {
             return;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -50,6 +50,9 @@
     }
 
     public void handleMessage(Message message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         HandlerChainInvoker invoker = getInvoker(message);
         if (invoker.getLogicalHandlers().isEmpty()) {
             return;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -60,6 +60,9 @@
     }
     
     public void handleMessage(Message message) throws Fault {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         HandlerChainInvoker invoker = getInvoker(message);
         if (invoker.getLogicalHandlers().isEmpty()) {
             return;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -70,6 +70,9 @@
     }
 
     public void handleMessage(SoapMessage message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         if (getInvoker(message).getProtocolHandlers().isEmpty()) {
             return;
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerFaultOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -89,6 +89,9 @@
     }
 
     public void handleMessage(SoapMessage message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         if (getInvoker(message).getProtocolHandlers().isEmpty()) {
             return;
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java Thu Feb 25 01:22:34 2010
@@ -106,6 +106,9 @@
     }
 
     public void handleMessage(SoapMessage message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         if (getInvoker(message).getProtocolHandlers().isEmpty()) {
             return;
         }
@@ -283,6 +286,9 @@
     }
 
     public void handleFault(SoapMessage message) {
+        if (binding.getHandlerChain().isEmpty()) {
+            return;
+        }
         if (getInvoker(message).getProtocolHandlers().isEmpty()) {
             return;
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -47,7 +47,7 @@
 
         Exchange exchange = message.getExchange();
         
-        OperationInfo op = exchange.get(OperationInfo.class);
+        OperationInfo op = exchange.getBindingOperationInfo().getOperationInfo();
         if (op == null || !op.hasOutput() || op.getOutput().size() == 0) {
             return;
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -49,7 +49,9 @@
     public void handleMessage(Message message) throws Fault {
         MessageContentsList outObjects = MessageContentsList.getContentsList(message);
         Exchange exchange = message.getExchange();
-        OperationInfo op = exchange.get(OperationInfo.class);
+        OperationInfo op = exchange.getBindingOperationInfo() == null 
+            ? null
+                : exchange.getBindingOperationInfo().getOperationInfo();
         
         if (LOG.isLoggable(Level.FINE)) {
             LOG.fine("op: " + op);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -46,7 +46,7 @@
     }
 
     public void handleMessage(SoapMessage message) throws Fault {
-        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
+        BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
         if (bop == null) {
             return;
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -99,7 +99,7 @@
 
     public void handleMessage(SoapMessage message) throws Fault {
         Exchange ex = message.getExchange();
-        BindingOperationInfo bop = ex.get(BindingOperationInfo.class);
+        BindingOperationInfo bop = ex.getBindingOperationInfo();
         if (bop == null) {
             return;
         }
@@ -118,7 +118,7 @@
         SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
         
         if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().size() == 0) {
-            Service s = ex.get(Service.class);
+            Service s = ex.getService();
             DataBinding db = s.getDataBinding();
             if (db instanceof JAXBDataBinding
                 && hasSwaRef((JAXBDataBinding) db)) {

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java Thu Feb 25 01:22:34 2010
@@ -56,7 +56,7 @@
 
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
-        BindingOperationInfo boi = ex.get(BindingOperationInfo.class);
+        BindingOperationInfo boi = ex.getBindingOperationInfo();
         if (Boolean.TRUE.equals(message.get(Message.PARTIAL_RESPONSE_MESSAGE)) 
             || boi == null) {
             return;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java?rev=916080&r1=916079&r2=916080&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java Thu Feb 25 01:22:34 2010
@@ -50,7 +50,7 @@
 
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
-        BindingOperationInfo bop = ex.get(BindingOperationInfo.class);
+        BindingOperationInfo bop = ex.getBindingOperationInfo();
 
         MessageInfo messageInfo = message.get(MessageInfo.class);
         if (messageInfo == null || bop == null || !bop.isUnwrapped()) {



Mime
View raw message