cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1003280 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/ rt/transports/http/src/main/java/org/apache/cxf/transport/http/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/
Date Thu, 30 Sep 2010 21:12:40 GMT
Author: dkulp
Date: Thu Sep 30 21:12:40 2010
New Revision: 1003280

URL: http://svn.apache.org/viewvc?rev=1003280&view=rev
Log:
Merged revisions 1003251 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1003251 | dkulp | 2010-09-30 16:49:34 -0400 (Thu, 30 Sep 2010) | 1 line
  
  [CXF-3004] Make sure the response codes for ws-add and ws-rm things are correct
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=1003280&r1=1003279&r2=1003280&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Thu Sep 30 21:12:40 2010
@@ -450,9 +450,6 @@ public class JettyHTTPDestinationTest ex
         Message partialResponse = setUpOutMessage();
         Conduit partialBackChannel =
             destination.getBackChannel(inMessage, partialResponse, replyTo);
-        assertEquals("unexpected response code",
-                     202,
-                     partialResponse.get(Message.RESPONSE_CODE));
         partialBackChannel.prepare(partialResponse);
         verifyBackChannelSend(partialBackChannel, partialResponse, 202);
 

Modified: cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1003280&r1=1003279&r2=1003280&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Thu Sep 30 21:12:40 2010
@@ -533,7 +533,7 @@ public abstract class AbstractHTTPDestin
                     }
                 }
                 response.setStatus(status);
-            } else if (oneWay) {
+            } else if (oneWay && !MessageUtils.isPartialResponse(outMessage)) {
                 response.setStatus(HttpURLConnection.HTTP_ACCEPTED);
             } else {
                 response.setStatus(HttpURLConnection.HTTP_OK);
@@ -541,7 +541,6 @@ public abstract class AbstractHTTPDestin
 
             copyResponseHeaders(outMessage, response);
 
-            
             if (oneWay && !isPartialResponse(outMessage)) {
                 response.setContentLength(0);
                 response.flushBuffer();

Modified: cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java?rev=1003280&r1=1003279&r2=1003280&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
Thu Sep 30 21:12:40 2010
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.rm.soap;
 
 
+import java.net.HttpURLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -220,6 +221,10 @@ public class RMSoapInterceptor extends A
                 }
             }
             Node node = hdr.getFirstChild();
+            if (node != null && MessageUtils.isPartialResponse(message)) {
+                // make sure the response is returned as HTTP 200 and not 202
+                message.put(Message.RESPONSE_CODE, HttpURLConnection.HTTP_OK);
+            }
             while (node != null) {
                 Header holder = new Header(new QName(node.getNamespaceURI(), node.getLocalName()),
node);
                 header.add(holder);



Mime
View raw message