Author: darran.lofthouse(a)jboss.com
Date: 2008-11-20 09:12:42 -0500 (Thu, 20 Nov 2008)
New Revision: 8765
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
Log:
[JBPAPP-1438] Drop port from URL for endpoint where default port for the protocol is being
used.
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2008-11-20
12:46:13 UTC (rev 8764)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2008-11-20
14:12:42 UTC (rev 8765)
@@ -226,11 +226,26 @@
ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
String host = config.getWebServiceHost();
- int port = config.getWebServicePort();
+ String port = "";
if ("https".equals(uriScheme))
- port = config.getWebServiceSecurePort();
+ {
+ int portNo = config.getWebServiceSecurePort();
+ if (portNo != 443)
+ {
+ port = ":" + portNo;
+ }
- String urlStr = uriScheme + "://" + host + ":" + port +
servicePath;
+ }
+ else
+ {
+ int portNo = config.getWebServicePort();
+ if (portNo != 80)
+ {
+ port = ":" + portNo;
+ }
+ }
+
+ String urlStr = uriScheme + "://" + host + port + servicePath;
try
{
return new URL(urlStr).toExternalForm();
@@ -305,7 +320,7 @@
String serviceEndpointURL = getServiceEndpointAddress(uriScheme,
servicePath);
SPIProvider spiProvider =
SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
boolean alwaysModify = config.isModifySOAPAddress();
if (alwaysModify || uriScheme == null ||
orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0)
Show replies by date