Author: alessio.soldano(a)jboss.com
Date: 2009-08-03 15:23:22 -0400 (Mon, 03 Aug 2009)
New Revision: 10464
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AddressRewritingEndpointInfo.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java
Log:
[JBWS-1655] Now passing secure test cases too
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AddressRewritingEndpointInfo.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AddressRewritingEndpointInfo.java 2009-08-03
19:12:40 UTC (rev 10463)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AddressRewritingEndpointInfo.java 2009-08-03
19:23:22 UTC (rev 10464)
@@ -48,14 +48,12 @@
private static Logger log = Logger.getLogger(AddressRewritingEndpointInfo.class);
private ServerConfig serverConfig;
- private String transportGuarantee;
SoapAddress saddress;
- AddressRewritingEndpointInfo(ServiceInfo serv, String trans, ServerConfig
serverConfig, String transportGuarantee)
+ AddressRewritingEndpointInfo(ServiceInfo serv, String trans, ServerConfig
serverConfig)
{
super(serv, trans);
this.serverConfig = serverConfig;
- this.transportGuarantee = transportGuarantee;
}
/**
@@ -71,7 +69,6 @@
public void setAddress(String s)
{
String previousAddress = super.getAddress();
- log.warn(previousAddress + " -> " + s + " ?");
super.setAddress(s);
boolean setNewAddress = false;
if (previousAddress == null)
@@ -83,7 +80,7 @@
String uriScheme = getUriScheme(s);
//we set https if the transport guarantee is CONFIDENTIAL or the previous
address already used https
//(if the original wsdl soap:address uses https we can't overwrite it with
http)
- if (isConfidential() ||
"https".equalsIgnoreCase(getUriScheme(previousAddress)))
+ if ("https".equalsIgnoreCase(getUriScheme(previousAddress)))
{
uriScheme = "https";
}
@@ -97,7 +94,7 @@
}
if (setNewAddress && saddress != null)
{
- log.info("New service endpoint address: " + s);
+ log.info("Setting new service endpoint address in wsdl: " + s);
saddress.setLocationURI(s);
}
}
@@ -123,22 +120,16 @@
//check config prop forcing address rewrite
if (serverConfig.isModifySOAPAddress())
{
- log.warn("Rewrite required because of configuration");
+ log.debug("Rewrite required because of configuration");
return true;
}
//check if the previous address is not valid
if (isInvalidAddress(previousAddress))
{
- log.warn("Rewrite required because of invalid url");
+ log.debug("Rewrite required because of invalid url");
return true;
}
- String uriScheme = getUriScheme(previousAddress);
- //check if the address' scheme does not match the transport guarantee
- if ("http".equalsIgnoreCase(uriScheme) && isConfidential())
- {
- return true;
- }
- log.warn("Rewrite NOT required");
+ log.debug("Rewrite not required");
return false;
}
@@ -164,11 +155,6 @@
return false;
}
- private boolean isConfidential()
- {
- return "CONFIDENTIAL".equals(transportGuarantee);
- }
-
/**
* Rewrite the provided address according to the current server
* configuration and always using the specified uriScheme.
@@ -202,12 +188,12 @@
}
}
String urlStr = uriScheme + "://" + host + port + path;
- log.info("Rewritten new candidate service endpoint address '" + s
+ "' to '" + urlStr + "'");
+ log.debug("Rewritten new candidate service endpoint address '" + s
+ "' to '" + urlStr + "'");
return urlStr;
}
catch (Exception e)
{
- log.info("Invalid url provided, using it without rewriting: " + s);
+ log.debug("Invalid url provided, using it without rewriting: " + s);
return s;
}
}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java 2009-08-03
19:12:40 UTC (rev 10463)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java 2009-08-03
19:23:22 UTC (rev 10464)
@@ -63,7 +63,7 @@
transportURI = sbi.getTransportURI();
}
ServerConfig config = getServerConfig();
- EndpointInfo info = new AddressRewritingEndpointInfo(serviceInfo, transportURI,
config, "");
+ EndpointInfo info = new AddressRewritingEndpointInfo(serviceInfo, transportURI,
config);
if (port != null)
{
List ees = port.getExtensibilityElements();
Show replies by date