servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r368020 - /incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java
Date Wed, 11 Jan 2006 13:02:19 GMT
Author: gnodet
Date: Wed Jan 11 05:02:16 2006
New Revision: 368020

URL: http://svn.apache.org/viewcvs?rev=368020&view=rev
Log:
Check exchange status in HttpInOutBinding

Modified:
    incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java

Modified: incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java?rev=368020&r1=368019&r2=368020&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java
(original)
+++ incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpInOutBinding.java
Wed Jan 11 05:02:16 2006
@@ -16,6 +16,7 @@
 package org.apache.servicemix.components.http;
 
 import javax.jbi.JBIException;
+import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.InOnly;
 import javax.jbi.messaging.InOut;
 import javax.jbi.messaging.MessageExchangeFactory;
@@ -57,6 +58,13 @@
             exchange.setInMessage(inMessage);
             boolean result = getDeliveryChannel().sendSync(exchange);
             if (result) {
+            	if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            		if (exchange.getError() != null) {
+            			throw new ServletException(exchange.getError());
+            		} else {
+            			throw new ServletException("Exchange status is ERROR");
+            		}
+            	}
                 getMarshaler().toResponse(exchange, exchange.getOutMessage(), response);
             }
             done(exchange);



Mime
View raw message