Author: kurtstam
Date: 2011-11-04 11:47:26 -0400 (Fri, 04 Nov 2011)
New Revision: 1470
Modified:
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java
Log:
RIFTSAW-462, Avoid rewriting the URL with a double slash
Modified: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java
===================================================================
---
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java 2011-11-04
09:55:01 UTC (rev 1469)
+++
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java 2011-11-04
15:47:26 UTC (rev 1470)
@@ -54,7 +54,7 @@
* @return
*/
public String rewriteToWSDLURL(URL url) {
- return getWebserviceBaseUrl() + "/" + url.getPath() + "?wsdl";
+ return getWebserviceBaseUrl() + url.getPath() + "?wsdl";
}
/**
*
@@ -62,7 +62,7 @@
* @return
*/
public String rewrite(URL url) {
- return getWebserviceBaseUrl() + "/" + url.getPath();
+ return getWebserviceBaseUrl() + url.getPath();
}
/**
*
@@ -71,6 +71,7 @@
private String getWebserviceBaseUrl() {
String url = properties.getProperty(BPELEngineImpl.BPEL_WEBSERVICE_BASEURL);
if (url != null) {
+ if (!url.endsWith("/")) url = url + "/";
return url;
}
return getDefaultWebServiceBaseUrl();
@@ -86,7 +87,9 @@
int secureWebServicePort = serverConfig.getWebServicePort();
theURL = new URL("https://" + webServiceHost + ":" +
secureWebServicePort);
}
- return theURL.toExternalForm();
+ String url = theURL.toExternalForm();
+ if (!url.endsWith("/")) url = url + "/";
+ return url;
} catch (MalformedURLException e) {
log.error("Error in constructing the webservice base url.", e);
return null;