servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdo...@apache.org
Subject svn commit: r429770 - /incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java
Date Tue, 08 Aug 2006 18:50:49 GMT
Author: pdodds
Date: Tue Aug  8 11:50:48 2006
New Revision: 429770

URL: http://svn.apache.org/viewvc?rev=429770&view=rev
Log:
Fixed the handling order for consumer http endpoints

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java?rev=429770&r1=429769&r2=429770&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java
Tue Aug  8 11:50:48 2006
@@ -17,7 +17,6 @@
 package org.apache.servicemix.http.packaging;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import javax.jbi.messaging.MessageExchange;
@@ -45,20 +44,21 @@
 		Consumes consumes;
 		if (endpoint.getRole().equals(MessageExchange.Role.CONSUMER)) {
 			consumes = new Consumes();
-			consumes = new Consumes();
-			consumes.setEndpointName(endpoint.getEndpoint());
-			consumes.setInterfaceName(endpoint.getInterfaceName());
-			consumes.setServiceName(endpoint.getService());
-			consumesList.add(consumes);
-		}
-		HttpEndpoint httpEndpoint = (HttpEndpoint) endpoint;
-		consumes = new Consumes();
-		consumes.setEndpointName(httpEndpoint.getTargetEndpoint());
-		consumes.setInterfaceName(httpEndpoint.getTargetInterfaceName());
-		consumes.setServiceName(httpEndpoint.getTargetService());
-		if (consumes.isValid())
-			consumesList.add(consumes);
-		
+			HttpEndpoint httpEndpoint = (HttpEndpoint) endpoint;
+			consumes.setEndpointName(httpEndpoint.getTargetEndpoint());
+			consumes.setInterfaceName(httpEndpoint.getTargetInterfaceName());
+			consumes.setServiceName(httpEndpoint.getTargetService());
+			if (consumes.isValid())
+				consumesList.add(consumes);
+			else {
+				consumes = new Consumes();
+				consumes.setEndpointName(endpoint.getEndpoint());
+				consumes.setInterfaceName(endpoint.getInterfaceName());
+				consumes.setServiceName(endpoint.getService());
+				consumesList.add(consumes);
+			}
+		}		
+
 		return consumesList;
 	}
 



Mime
View raw message