Author: rsearls
Date: 2014-06-02 12:53:14 -0400 (Mon, 02 Jun 2014)
New Revision: 18709
Modified:
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/WSDLSoapAddressRewriteUtils.java
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
Log:
webservicePath attr revised webServicePathRewriteRule
Modified:
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
===================================================================
---
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-06-02
15:43:58 UTC (rev 18708)
+++
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-06-02
16:53:14 UTC (rev 18709)
@@ -57,7 +57,7 @@
final String origUriScheme = getUriScheme(wsdlAddress); //will be https if the
user wants a https address in the wsdl
final String newUriScheme = getUriScheme(epAddress); //will be https if the user
set confidential transport for the endpoint
final String uriScheme = (origUriScheme.equals(HTTPS) ||
newUriScheme.equals(HTTPS)) ? HTTPS : HTTP;
- return rewriteSoapAddress(serverConfig, wsdlAddress, epAddress, uriScheme,
serverConfig.getWebServicePath(), contextRoot);
+ return rewriteSoapAddress(serverConfig, wsdlAddress, epAddress, uriScheme,
serverConfig.getWebServicePathRewriteRule(), contextRoot);
}
else
{
@@ -187,7 +187,7 @@
{
try
{
- final String additionalCcontext = serverConfig.getWebServicePath();
+ final String additionalCcontext = serverConfig.getWebServicePathRewriteRule();
if (isSoapAddressRewrite(serverConfig))
{
final URL url = new URL(address);
@@ -211,6 +211,6 @@
}
public static boolean isSoapAddressRewrite(ServerConfig sc){
- return (sc.isModifySOAPAddress() &&
!StringUtils.isEmpty(sc.getWebServicePath()));
+ return (sc.isModifySOAPAddress() &&
!StringUtils.isEmpty(sc.getWebServicePathRewriteRule()));
}
}
Modified:
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/WSDLSoapAddressRewriteUtils.java
===================================================================
---
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/WSDLSoapAddressRewriteUtils.java 2014-06-02
15:43:58 UTC (rev 18708)
+++
stack/cxf/branches/rsearls/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/util/WSDLSoapAddressRewriteUtils.java 2014-06-02
16:53:14 UTC (rev 18709)
@@ -213,26 +213,6 @@
String.valueOf(endpointInfo.getProperty(PUBLISHED_ENDPOINT_URL));
updatePublishedEndpointUrl(epurl, def, endpointInfo.getName());
}
- /** rls test else {
- // When using replacement path must set replacement path in active url.
- ServerConfig sc = getServerConfig();
- if (sc.isModifySOAPAddress() &&
!StringUtils.isEmpty(sc.getWebServicePath()
- &&
endpointInfo.getAddress().contains(ServerConfig.UNDEFINED_HOSTNAME)) {
- try {
- String base = endpointInfo.getAddress();
- URL baseUrl = new URL(base);
- //String tmpPath =
Unix4j.builder().echo(baseUrl.getPath()).sed(sc.getWebServicePath()).toStringResult();
- String tmpPath =
SEDProcessor.newInstance(sc.getWebServicePath()).processLine(baseUrl.getPath());
- String epurl = base.replace(baseUrl.getPath(), tmpPath);
- updatePublishedEndpointUrl(epurl, def, endpointInfo.getName());
- //base = epurl;
- } catch (Exception e){
- // TODO fix
- LOG.info(e.toString());
- }
- }
- }
- **/
}
}
Modified:
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
===================================================================
---
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2014-06-02
15:43:58 UTC (rev 18708)
+++
stack/cxf/branches/rsearls/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2014-06-02
16:53:14 UTC (rev 18709)
@@ -84,7 +84,7 @@
{
modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"ModifySOAPAddress");
webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"WebServiceHost");
- webServicePath = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"WebServicePath");
+ webServicePath = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"WebServicePathRewriteRule");
super.setUp();
}
}
@@ -100,7 +100,7 @@
getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
attr = new Attribute("WebServiceHost",
JBWS2150TestSetup.webServiceHost);
getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- attr = new Attribute("WebServicePath",
JBWS2150TestSetup.webServicePath);
+ attr = new Attribute("WebServicePathRewriteRule",
JBWS2150TestSetup.webServicePath);
getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
}
@@ -538,7 +538,7 @@
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150";
final String sedCmd = "s/jaxws-jbws2150/xx\\/jaxws-jbws2150/g";
- setWebServicePath(sedCmd);
+ setWebServicePathRewriteRule(sedCmd);
deploy("jaxws-jbws2150.war");
try
{
@@ -585,7 +585,7 @@
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150-codefirst";
final String sedCmd =
"s/jaxws-jbws2150-codefirst/xx\\/jaxws-jbws2150-codefirst/g";
- setWebServicePath(sedCmd);
+ setWebServicePathRewriteRule(sedCmd);
deploy("jaxws-jbws2150-codefirst.war");
try
{
@@ -612,7 +612,7 @@
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150-codefirst";
final String sedCmd =
"s/jaxws-jbws2150-codefirst/xx\\/jaxws-jbws2150-codefirst/g";
- setWebServicePath(sedCmd);
+ setWebServicePathRewriteRule(sedCmd);
setWebServiceHost(ServerConfig.UNDEFINED_HOSTNAME);
deploy("jaxws-jbws2150-codefirst.war");
try
@@ -647,7 +647,7 @@
setModifySOAPAddress(true);
final String addContext = "xx/jaxws-jbws2150";
final String sedCmd = "s/jaxws-jbws2150/xx\\/jaxws-jbws2150/g";
- setWebServicePath(sedCmd);
+ setWebServicePathRewriteRule(sedCmd);
setWebServiceHost(ServerConfig.UNDEFINED_HOSTNAME);
deploy("jaxws-jbws2150.war");
try
@@ -722,9 +722,9 @@
getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
}
- private void setWebServicePath(String value) throws Exception
+ private void setWebServicePathRewriteRule(String value) throws Exception
{
- Attribute attr = new Attribute("WebServicePath", value);
+ Attribute attr = new Attribute("WebServicePathRewriteRule", value);
getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
}