Author: jim.ma
Date: 2014-08-11 06:07:33 -0400 (Mon, 11 Aug 2014)
New Revision: 18840
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3785]:Add option for forcing https protocol when rewriting soap:addres in WSDL
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-08-11
10:06:34 UTC (rev 18839)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-08-11
10:07:33 UTC (rev 18840)
@@ -69,6 +69,7 @@
String host = serverConfig.getWebServiceHost();
Map<String, Endpoint> endpointsMap = new HashMap<String, Endpoint>();
List<Endpoint> deleteList = new LinkedList<Endpoint>();
+ String uriSchema = serverConfig.getWebServiceUriScheme();
for (Endpoint ep : service.getEndpoints())
{
if (ep instanceof HttpEndpoint)
@@ -84,8 +85,12 @@
if (urlPattern.endsWith("/*"))
urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
-
+
String protocol = confidential ? "https://" : "http://";
+ //force address protocol
+ if (uriSchema != null) {
+ protocol = uriSchema + "://";
+ }
String address = protocol + hostAndPort + (contextRoot.equals("/")
&& urlPattern.startsWith("/") ? "" : contextRoot) +
urlPattern;
httpEp.setAddress(address);
//JBWS-2957: EJB3 binds the same endpoint class to multiple beans at multiple
JNDI locations;
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-08-11
10:06:34 UTC (rev 18839)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-08-11
10:07:33 UTC (rev 18840)
@@ -85,7 +85,10 @@
// The SOAP address path component for substitution in the existing SOAP address.
private volatile String webServicePathRewriteRule;
private final Object webServicePathRewriteRuleLock = new Object();
-
+
+ //The SOAP address uri schema, http is the default value
+ private volatile String webServiceUriScheme;
+ private final Object webServiceUriSchemeLock = new Object();
private volatile boolean statisticsEnabled;
//The stack config
@@ -287,7 +290,29 @@
this.webServicePathRewriteRule = path;
}
}
+
+ public String getWebServiceUriScheme()
+ {
+ return this.webServiceUriScheme;
+ }
+ public void setWebServiceUriScheme(String scheme)
+ {
+ setWebServiceUriScheme(scheme, null);
+ }
+
+ public void setWebServiceUriScheme(String scheme, UpdateCallbackHandler uch)
+ {
+ synchronized (webServiceUriSchemeLock) {
+ if (uch != null)
+ {
+ uch.onBeforeUpdate();
+ }
+ this.webServiceUriScheme = scheme;
+ }
+ }
+
+
private int getConnectorPort(boolean secure) {
final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
int port = 0;
Show replies by date