servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r415613 - /incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
Date Tue, 20 Jun 2006 11:22:49 GMT
Author: gnodet
Date: Tue Jun 20 04:22:49 2006
New Revision: 415613

URL: http://svn.apache.org/viewvc?rev=415613&view=rev
Log:
Throw a meaningfull exception if no 'in' message is set on the incoming exchange

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java?rev=415613&r1=415612&r2=415613&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
Tue Jun 20 04:22:49 2006
@@ -93,9 +93,12 @@
         } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
             return;
         }
+        NormalizedMessage nm = exchange.getMessage("in");
+        if (nm == null) {
+            throw new IllegalStateException("Exchange has no input message");
+        }
         PostMethod method = new PostMethod(relUri);
         SoapMessage soapMessage = new SoapMessage();
-        NormalizedMessage nm = exchange.getMessage("in");
         soapHelper.getJBIMarshaler().fromNMS(soapMessage, nm);
         Context context = soapHelper.createContext(soapMessage);
         soapHelper.onSend(context);



Mime
View raw message