Author: jim.ma
Date: 2014-08-14 04:43:00 -0400 (Thu, 14 Aug 2014)
New Revision: 18846
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
Log:
[JBWS-3805]:Add property to force the address uri scheme
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-14
08:41:55 UTC (rev 18845)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-14
08:43:00 UTC (rev 18846)
@@ -26,7 +26,9 @@
import java.net.URI;
import java.net.URL;
+import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.ws.common.Constants;
/**
* Helper for rewriting soap:address in published wsdl
@@ -48,7 +50,7 @@
* @param serverConfig The current ServerConfig
* @return The rewritten soap:address to be used in the wsdl
*/
- public static String getRewrittenPublishedEndpointUrl(String wsdlAddress, String
epAddress, ServerConfig serverConfig) {
+ public static String getRewrittenPublishedEndpointUrl(String wsdlAddress, String
epAddress, ServerConfig serverConfig, Service service) {
if (wsdlAddress == null) {
return null;
}
@@ -60,6 +62,9 @@
if (serverConfig.getWebServiceUriScheme() != null) {
uriScheme = serverConfig.getWebServiceUriScheme();
}
+ if (uriScheme == null) {
+ uriScheme = (String)service.getProperty(Constants.FORCE_URI_SCHEME);
+ }
return rewriteSoapAddress(serverConfig, wsdlAddress, epAddress, uriScheme);
}
else
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2014-08-14
08:41:55 UTC (rev 18845)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2014-08-14
08:43:00 UTC (rev 18846)
@@ -294,7 +294,7 @@
//do not try rewriting addresses for not-http binding
String wsdlAddress = parser.filterSoapAddress(ddep.getServiceName(),
ddep.getPortName(), SOAPAddressWSDLParser.SOAP_HTTP_NS);
- String rewrittenWsdlAddress =
SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl(wsdlAddress, ddep.getAddress(),
sc);
+ String rewrittenWsdlAddress =
SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl(wsdlAddress, ddep.getAddress(),
sc, dep.getService());
//If "auto rewrite", leave "publishedEndpointUrl" unset
so that CXF does not force host/port values for
//wsdl imports and auto-rewrite them too; otherwise set the new address into
"publishedEndpointUrl",
//which causes CXF to override any address in the published wsdl.