Author: richard.opalka(a)jboss.com
Date: 2009-10-02 06:10:22 -0400 (Fri, 02 Oct 2009)
New Revision: 10824
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
Log:
[JBWS-2674][JBWS-2754] providing test cases (WIP)
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2009-10-01
16:18:03 UTC (rev 10823)
+++
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2009-10-02
10:10:22 UTC (rev 10824)
@@ -53,13 +53,22 @@
if (contextRoot == null)
throw new IllegalStateException("Cannot obtain context root");
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
+ // TODO: remove this hack - review API
+ String protocol = (String)dep.getService().getProperty("protocol");
+ String host = (String)dep.getService().getProperty("host");
+ Integer port = (Integer)dep.getService().getProperty("port");
+ Integer securePort = null;
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- int securePort = serverConfig.getWebServiceSecurePort();
+ if (protocol == null)
+ {
+ SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
+ ServerConfig serverConfig = spi.getServerConfig();
+
+ host = serverConfig.getWebServiceHost();
+ port = serverConfig.getWebServicePort();
+ securePort = serverConfig.getWebServiceSecurePort();
+ }
for (Endpoint ep : dep.getService().getEndpoints())
{
boolean confidential = isConfidentialTransportGuarantee(dep, ep);
@@ -72,7 +81,7 @@
if (urlPattern.endsWith("/*"))
urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
- String protocol = confidential ? "https://" : "http://";
+ protocol = confidential ? "https://" : "http://";
ep.setAddress(protocol + hostAndPort + contextRoot + urlPattern);
}
}
Show replies by date