[jbossws-commits] JBossWS SVN: r10943 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Fri Oct 16 11:37:12 EDT 2009
Author: alessio.soldano at jboss.com
Date: 2009-10-16 11:37:11 -0400 (Fri, 16 Oct 2009)
New Revision: 10943
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBWS-2262] WSDL is not correctly modified to use the configured https port
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-10-16 10:54:30 UTC (rev 10942)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-10-16 15:37:11 UTC (rev 10943)
@@ -216,7 +216,7 @@
if (isHttp(orgLocation))
{
URL orgURL = new URL(orgLocation);
- String protocol = orgURL.getProtocol();
+ String orgProtocol = orgURL.getProtocol();
String host = orgURL.getHost();
final boolean rewriteLocation =
ServerConfig.UNDEFINED_HOSTNAME.equals(host) ||
@@ -224,9 +224,14 @@
if (rewriteLocation)
{
- int port = getPortForProtocol(protocol);
+ //we stick with the original protocol (https) if the transport guarantee is CONFIDENTIAL
+ //(if the original wsdl soap:address uses https we can't overwrite it with http)
+ boolean confidential = "https".equalsIgnoreCase(orgProtocol);
+ String reqProtocol = reqURL.getProtocol();
+
+ int port = confidential ? getPortForProtocol("https") : getPortForProtocol(reqProtocol);
String path = orgURL.getPath();
- String newLocation = new URL(protocol, wsdlHost, port, path).toString();
+ String newLocation = new URL(confidential ? "https" : reqProtocol, wsdlHost, port, path).toString();
if (!newLocation.equals(orgLocation))
{
locationAttr.setNodeValue(newLocation);
More information about the jbossws-commits
mailing list