Author: jim.ma
Date: 2014-08-19 03:48:01 -0400 (Tue, 19 Aug 2014)
New Revision: 18848
Modified:
common/trunk/src/main/java/org/jboss/ws/common/Constants.java
common/trunk/src/main/java/org/jboss/ws/common/Loggers.java
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][JBWS-3805]:Revert the previous change;only provide option to force change the
soap address uri scheme
Modified: common/trunk/src/main/java/org/jboss/ws/common/Constants.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/Constants.java 2014-08-18 15:41:42 UTC
(rev 18847)
+++ common/trunk/src/main/java/org/jboss/ws/common/Constants.java 2014-08-19 07:48:01 UTC
(rev 18848)
@@ -320,6 +320,4 @@
static final String HTTP_MAX_CONNECTIONS =
"org.jboss.ws.http.maxConnections";
static final String NETTY_MESSAGE = "org.jboss.ws.http.netty.Message";
-
- static final String FORCE_URI_SCHEME =
"org.jboss.ws.address.forceUriScheme";
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/Loggers.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/Loggers.java 2014-08-18 15:41:42 UTC
(rev 18847)
+++ common/trunk/src/main/java/org/jboss/ws/common/Loggers.java 2014-08-19 07:48:01 UTC
(rev 18848)
@@ -222,9 +222,4 @@
@LogMessage(level = TRACE)
@Message(id = 22116, value = "Could not find %s in the additional
metadatafiles")
void cannotFindInAdditionalMetaData(String resourcePath);
-
-
- @LogMessage(level = WARN)
- @Message(id = 22118, value = "Invalid uri schema value %s")
- void invalidUriSchemeValue(String scheme);
}
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-18
15:41:42 UTC (rev 18847)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-08-19
07:48:01 UTC (rev 18848)
@@ -31,8 +31,6 @@
import java.util.Map;
import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.Loggers;
import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.management.AbstractServerConfig;
@@ -47,7 +45,6 @@
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
-import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
/**
* A deployer that assigns the endpoint address.
@@ -72,33 +69,11 @@
String host = serverConfig.getWebServiceHost();
Map<String, Endpoint> endpointsMap = new HashMap<String, Endpoint>();
List<Endpoint> deleteList = new LinkedList<Endpoint>();
- String uriSchema = serverConfig.getWebServiceUriScheme();
- JBossWebservicesMetaData wsmd = dep.getAttachment(JBossWebservicesMetaData.class);
- if (uriSchema == null && wsmd != null &&
wsmd.getProperty(Constants.FORCE_URI_SCHEME) != null)
- {
- String wsmdScheme = wsmd.getProperty(Constants.FORCE_URI_SCHEME);
- if ("http".equals(wsmdScheme) ||
"https".equals(wsmdScheme))
- {
- uriSchema = wsmdScheme;
- dep.getService().setProperty(Constants.FORCE_URI_SCHEME, uriSchema);
- } else {
- Loggers.DEPLOYMENT_LOGGER.invalidUriSchemeValue(wsmdScheme);
- }
- }
for (Endpoint ep : service.getEndpoints())
{
if (ep instanceof HttpEndpoint)
{
- boolean confidential = false;
- if ("https".equals(uriSchema)) {
- confidential = true;
- }
- if ("http".equals(uriSchema)) {
- confidential = false;
- }
- if (uriSchema == null) {
- confidential = isConfidentialTransportGuarantee(dep, ep);
- }
+ boolean confidential = isConfidentialTransportGuarantee(dep, ep);
int currentPort = port.getValue(confidential);
String hostAndPort = host + (currentPort > 0 ? ":" + currentPort
: "");
@@ -109,7 +84,7 @@
if (urlPattern.endsWith("/*"))
urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
-
+
String protocol = confidential ? "https://" : "http://";
String address = protocol + hostAndPort + (contextRoot.equals("/")
&& urlPattern.startsWith("/") ? "" : contextRoot) +
urlPattern;
httpEp.setAddress(address);
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-18
15:41:42 UTC (rev 18847)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-08-19
07:48:01 UTC (rev 18848)
@@ -89,6 +89,7 @@
//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
@@ -293,7 +294,7 @@
public String getWebServiceUriScheme()
{
- return this.webServiceUriScheme;
+ return this.webServiceUriScheme;
}
public void setWebServiceUriScheme(String scheme)
@@ -303,16 +304,16 @@
public void setWebServiceUriScheme(String scheme, UpdateCallbackHandler uch)
{
- synchronized (webServiceUriSchemeLock) {
- if (uch != null)
- {
- uch.onBeforeUpdate();
- }
- this.webServiceUriScheme = scheme;
- }
+ 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