You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/07/24 12:30:28 UTC

svn commit: r424995 - in /incubator/servicemix/trunk/servicemix-http/src: main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java test/java/org/apache/servicemix/http/HttpManagedTest.java

Author: gnodet
Date: Mon Jul 24 03:30:19 2006
New Revision: 424995

URL: http://svn.apache.org/viewvc?rev=424995&view=rev
Log:
SM-477: servicemix-http does not reply with HTTP 202 when processing "oneway" SOAP messages
Patch provided by Renaud Bruyeron

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
    incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java?rev=424995&r1=424994&r2=424995&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java Mon Jul 24 03:30:19 2006
@@ -219,6 +219,9 @@
                 exchange.setStatus(ExchangeStatus.DONE);
                 channel.send(exchange);
             }
+        } else if (exchange.getStatus() == ExchangeStatus.DONE) {
+            // This happens when there is no response to send back
+            response.setStatus(HttpServletResponse.SC_ACCEPTED);
         }
     }
     

Modified: incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java?rev=424995&r1=424994&r2=424995&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java Mon Jul 24 03:30:19 2006
@@ -62,7 +62,7 @@
         System.err.println("Started");
         
         PostMethod post = new PostMethod("http://localhost:8080/jbi/Service/");
-        post.setRequestEntity(new StringRequestEntity("<hello>world</hello>"));
+        post.setRequestEntity(new StringRequestEntity("<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'><soap:Body><hello>world</hello></soap:Body></soap:Envelope>"));
         new HttpClient().executeMethod(post);
         if (post.getStatusCode() != 200) {
             throw new InvalidStatusResponseException(post.getStatusCode());