Author: mageshbk(a)jboss.com
Date: 2007-05-06 04:01:02 -0400 (Sun, 06 May 2007)
New Revision: 2979
Modified:
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBWS-1609]Address in WSDL - Port value is -1 when server is requested with default port
80
Modified:
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
---
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-05-06
07:46:02 UTC (rev 2978)
+++
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-05-06
08:01:02 UTC (rev 2979)
@@ -138,13 +138,8 @@
ServiceEndpointManagerFactory factory =
ServiceEndpointManagerFactory.getInstance();
ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() +
":" + reqURL.getPort();
+ String wsdlHost = epManager.getDisplayHost(sepInfo, reqURL);
- if (epManager.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME)
== false)
- {
- wsdlHost = epManager.getDisplayHost(sepInfo, reqURL);
- }
-
if(log.isDebugEnabled()) log.debug("WSDL request, using host: " +
wsdlHost);
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Modified:
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
---
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-05-06
07:46:02 UTC (rev 2978)
+++
branches/jbossws-1.2.0.SP1-JBWS-1643/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-05-06
08:01:02 UTC (rev 2979)
@@ -46,6 +46,7 @@
* For a discussion of this topic.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 23-Mar-2005
*/
public class WSDLRequestHandler
@@ -134,10 +135,10 @@
if (! (wsdlHost.startsWith("http://") ||
wsdlHost.startsWith("https://")) )
{
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" +
reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = reqURL.getPort();
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" +
reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
}
String newLocation = completeHost + reqPath +
"?wsdl&resource=" + newResourcePath;
@@ -157,25 +158,12 @@
String orgLocation = locationAttr.getNodeValue();
URL locURL = new URL(orgLocation);
- String locProtocol = locURL.getProtocol();
String locPath = locURL.getPath();
- if (reqURL.getProtocol().equals(locProtocol) &&
reqURL.getPath().equals(locPath))
- {
- String completeHost = wsdlHost;
- if (! (completeHost.startsWith("http://") ||
completeHost.startsWith("https://")) )
- {
- int locPort = locURL.getPort();
- String hostAndPort = wsdlHost + (locPort > 0 ? ":" +
locPort : "");
+ String newLocation = wsdlHost + locPath;
+ locationAttr.setNodeValue(newLocation);
- completeHost = locProtocol + "://" + hostAndPort;
- }
-
- String newLocation = completeHost + locPath;
- locationAttr.setNodeValue(newLocation);
-
- log.trace("Mapping address from '" + orgLocation +
"' to '" + newLocation + "'");
- }
+ log.trace("Mapping address from '" + orgLocation +
"' to '" + newLocation + "'");
}
}
else
Show replies by date