cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r916863 - in /cxf/trunk: rt/core/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/...
Date Fri, 26 Feb 2010 23:28:56 GMT
Author: dkulp
Date: Fri Feb 26 23:28:55 2010
New Revision: 916863

URL: http://svn.apache.org/viewvc?rev=916863&view=rev
Log:
Make sure proper soap version is used for responses

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainInitiatorObserver.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.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/SOAPHandlerInterceptor.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PushBack401.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainInitiatorObserver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainInitiatorObserver.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainInitiatorObserver.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainInitiatorObserver.java
Fri Feb 26 23:28:55 2010
@@ -30,6 +30,7 @@
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.service.model.BindingFaultInfo;
@@ -69,7 +70,9 @@
                 
                 faultMessage = exchange.getOutMessage();
                 if (null == faultMessage) {
-                    faultMessage = exchange.get(Endpoint.class).getBinding().createMessage();
+                    faultMessage = new MessageImpl();
+                    faultMessage.setExchange(exchange);
+                    faultMessage = exchange.get(Endpoint.class).getBinding().createMessage(faultMessage);
                 }
                 faultMessage.setContent(Exception.class, ex);
                 if (null != mode) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
Fri Feb 26 23:28:55 2010
@@ -183,7 +183,9 @@
         Message message = m.getExchange().getOutMessage();
         if (message == null) {
             Endpoint ep = m.getExchange().get(Endpoint.class);
-            message = ep.getBinding().createMessage();
+            message = new org.apache.cxf.message.MessageImpl();
+            message.setExchange(m.getExchange());
+            message = ep.getBinding().createMessage(message);
             m.getExchange().setOutMessage(message);
         }
         

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
Fri Feb 26 23:28:55 2010
@@ -43,6 +43,7 @@
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.invoker.Factory;
 import org.apache.cxf.service.invoker.FactoryInvoker;
 import org.apache.cxf.service.invoker.SingletonFactory;
@@ -115,7 +116,9 @@
         Message m = exchange.getOutMessage();
         if (m == null && !exchange.isOneWay()) {
             Endpoint ep = exchange.get(Endpoint.class);
-            m = ep.getBinding().createMessage();
+            m = new MessageImpl();
+            m.setExchange(exchange);
+            m = ep.getBinding().createMessage(m);
             exchange.setOutMessage(m);
         }
         return m;

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
Fri Feb 26 23:28:55 2010
@@ -345,7 +345,9 @@
             }
             if (m == null) {
                 Endpoint ep = exchange.get(Endpoint.class);
-                m = ep.getBinding().createMessage();
+                m = new org.apache.cxf.message.MessageImpl();
+                m.setExchange(exchange);
+                m = ep.getBinding().createMessage(m);
                 exchange.setOutMessage(m);
             }
         }

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=916863&r1=916862&r2=916863&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
Fri Feb 26 23:28:55 2010
@@ -40,6 +40,7 @@
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
@@ -128,7 +129,9 @@
                 
                 Message faultMessage = exchange.getOutMessage();
                 if (null == faultMessage) {
-                    faultMessage = exchange.get(Endpoint.class).getBinding().createMessage();
+                    faultMessage = new MessageImpl();
+                    faultMessage.setExchange(message.getExchange());
+                    faultMessage = exchange.get(Endpoint.class).getBinding().createMessage(faultMessage);
                 }
                 faultMessage.setContent(Exception.class, ex);
                 if (null != mode) {

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=916863&r1=916862&r2=916863&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
Fri Feb 26 23:28:55 2010
@@ -35,6 +35,7 @@
 import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
@@ -87,7 +88,9 @@
         if (!message.getExchange().isOneWay()) {
             //server side inbound
             Endpoint e = message.getExchange().get(Endpoint.class);
-            Message responseMsg = e.getBinding().createMessage();            
+            Message responseMsg = new MessageImpl();
+            responseMsg.setExchange(message.getExchange());
+            responseMsg = e.getBinding().createMessage(responseMsg);            
 
             message.getExchange().setOutMessage(responseMsg);
             XMLStreamReader reader = message.getContent(XMLStreamReader.class);

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=916863&r1=916862&r2=916863&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
Fri Feb 26 23:28:55 2010
@@ -39,6 +39,7 @@
 import org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor;
 import org.apache.cxf.jaxws.handler.HandlerChainInvoker;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -141,7 +142,9 @@
                     message.getInterceptorChain().abort();
                     if (!message.getExchange().isOneWay()) {
                         Endpoint e = message.getExchange().get(Endpoint.class);
-                        Message responseMsg = e.getBinding().createMessage();           

+                        Message responseMsg = new MessageImpl();
+                        responseMsg.setExchange(message.getExchange());
+                        responseMsg = e.getBinding().createMessage(responseMsg);        
   
     
                         MessageObserver observer = (MessageObserver)message.getExchange()
                                     .get(MessageObserver.class);

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=916863&r1=916862&r2=916863&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
Fri Feb 26 23:28:55 2010
@@ -60,6 +60,7 @@
 import org.apache.cxf.jaxws.handler.HandlerChainInvoker;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -176,7 +177,9 @@
                 if (!message.getExchange().isOneWay()
                     && observer != null) {
                     Endpoint e = message.getExchange().get(Endpoint.class);
-                    Message responseMsg = e.getBinding().createMessage();
+                    Message responseMsg = new MessageImpl();
+                    responseMsg.setExchange(message.getExchange());
+                    responseMsg = e.getBinding().createMessage(responseMsg);
     
                     // the request message becomes the response message
                     message.getExchange().setInMessage(responseMsg);
@@ -204,8 +207,10 @@
                 // server side inbound
                 message.getInterceptorChain().abort();
                 Endpoint e = message.getExchange().get(Endpoint.class);
-                Message responseMsg = e.getBinding().createMessage();
                 if (!message.getExchange().isOneWay()) {
+                    Message responseMsg = new MessageImpl();
+                    responseMsg.setExchange(message.getExchange());
+                    responseMsg = e.getBinding().createMessage(responseMsg);
                     message.getExchange().setOutMessage(responseMsg);
                     SOAPMessage soapMessage = ((SOAPMessageContext)context).getMessage();
 

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Fri Feb 26 23:28:55 2010
@@ -1758,7 +1758,7 @@
      * Wrapper output stream responsible for flushing headers and handling
      * the incoming HTTP-level response (not necessarily the MEP response).
      */
-    public class WrappedOutputStream extends AbstractThresholdOutputStream {
+    protected class WrappedOutputStream extends AbstractThresholdOutputStream {
         /**
          * This field contains the currently active connection.
          */
@@ -1831,7 +1831,7 @@
             }
         }
         
-        public void handleHeadersTrustCaching() throws IOException {
+        protected void handleHeadersTrustCaching() throws IOException {
             // Need to set the headers before the trust decision
             // because they are set before the connect().
             setURLRequestHeaders(outMessage);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PushBack401.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PushBack401.java?rev=916863&r1=916862&r2=916863&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PushBack401.java
(original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PushBack401.java
Fri Feb 26 23:28:55 2010
@@ -32,6 +32,7 @@
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.transport.Conduit;
@@ -178,7 +179,9 @@
         Message outMessage = exchange.getOutMessage();
         if (outMessage == null) {
             Endpoint endpoint = exchange.get(Endpoint.class);
-            outMessage = endpoint.getBinding().createMessage();
+            outMessage = new MessageImpl();
+            outMessage.setExchange(exchange);
+            outMessage = endpoint.getBinding().createMessage(outMessage);
             exchange.setOutMessage(outMessage);
         }
         outMessage.putAll(message);



Mime
View raw message