You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/09/16 01:09:30 UTC

svn commit: r695683 - /ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java

Author: mriou
Date: Mon Sep 15 16:09:30 2008
New Revision: 695683

URL: http://svn.apache.org/viewvc?rev=695683&view=rev
Log:
Static JMS Destinations Parsed Incorrectly

Modified:
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java?rev=695683&r1=695682&r2=695683&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java Mon Sep 15 16:09:30 2008
@@ -161,8 +161,10 @@
         if (index == -1) {
         	destinationPrefix = baseUri + "/";
         	index = serviceName.indexOf(destinationPrefix);
+        	return (index != -1) ? serviceName.substring(destinationPrefix.length()) : serviceName;
+        } else {
+        	return serviceName.substring(index);
         }
-        return (index != -1) ? serviceName.substring(index) : serviceName;
 	}
 
 	private static String extractEndpointUri(ProcessConf pconf, QName wsdlServiceName, String portName) 
@@ -213,8 +215,8 @@
 		// Assume that path is HTTP-based, by default
 		String servicePrefix = "/processes/";
 		// Don't assume JMS-based paths start the same way 
-		if (path.startsWith("jms")) {
-			servicePrefix = "jms:/";
+		if (path.startsWith("jms://")) {
+			servicePrefix = "jms://";
 		}
 		int index = path.indexOf(servicePrefix);
 		if (-1 != index) {
@@ -230,7 +232,8 @@
 		        }
 		        // Qualify shared JMS names with unique baseUri
 		        if (path.startsWith("jms")) {
-		        	service = baseUri + "/" + service;
+		        	boolean slashPresent = baseUri.endsWith("/") || service.startsWith("/");
+		        	service = baseUri + (slashPresent ? "" : "/") + service;		        
 		        }
 		        return service;
 		    }
@@ -251,11 +254,11 @@
 			if (bundleName != null) {
 				baseServiceUri.append(bundleName).append("/");
 				if (pconf.getBpelDocument() != null) {
-					String diagramName = pconf.getBpelDocument();
-					if (diagramName.indexOf(".") > 0) {
-						diagramName = diagramName.substring(0, diagramName.indexOf(".") - 1);
+					String bpelDocumentName = pconf.getBpelDocument();
+					if (bpelDocumentName.indexOf(".") > 0) {
+						bpelDocumentName = bpelDocumentName.substring(0, bpelDocumentName.indexOf("."));
 					}
-					baseServiceUri.append(diagramName).append("/");
+					baseServiceUri.append(bpelDocumentName).append("/");
 					String processName = pconf.getType() != null 
 						? pconf.getType().getLocalPart() : null;
 					if (processName != null) {