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/06/20 13:22:49 UTC

svn commit: r415613 - /incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java

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);