summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-21 08:08:43 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-21 08:08:43 +0000
commitfc34a33e2d37bf93c866fe880596591f43c95512 (patch)
tree0a65a22b08d632fa7ea0c658291fe23bc6cd52c2 /sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main
parentc51f3fee7bec1b5fcb474a5b7e297fbf180703cf (diff)
Update to get the default http port from runtime properties
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@936193 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSBindingProviderFactory.java11
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java7
2 files changed, 13 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSBindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSBindingProviderFactory.java
index ca481d1f41..21c284e592 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSBindingProviderFactory.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSBindingProviderFactory.java
@@ -23,6 +23,7 @@ import java.util.List;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
@@ -31,6 +32,7 @@ import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+import org.apache.tuscany.sca.runtime.RuntimeProperties;
/**
* Axis2BindingProviderFactory
@@ -43,6 +45,7 @@ public class JAXWSBindingProviderFactory implements BindingProviderFactory<WebSe
private FactoryExtensionPoint modelFactories;
private ServletHost servletHost;
private DataBindingExtensionPoint dataBindings;
+ private String defaultPort = "8085";
public JAXWSBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
@@ -52,6 +55,12 @@ public class JAXWSBindingProviderFactory implements BindingProviderFactory<WebSe
}
modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
+
+ RuntimeProperties ps = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class);
+ String pp = ps.getProperties().getProperty(this.getClass().getName() + ".defaultPort");
+ if (pp != null) {
+ this.defaultPort = ps.getProperties().getProperty(this.getClass().getName() + ".defaultPort");
+ }
}
public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) {
@@ -59,7 +68,7 @@ public class JAXWSBindingProviderFactory implements BindingProviderFactory<WebSe
}
public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
- return new JAXWSServiceBindingProvider(endpoint, servletHost, modelFactories, dataBindings);
+ return new JAXWSServiceBindingProvider(endpoint, servletHost, modelFactories, dataBindings, defaultPort);
}
public Class<WebServiceBinding> getModelType() {
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
index c4a2822a02..b8efc2dcdd 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
@@ -29,7 +29,6 @@ import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLWriter;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.Endpoint;
import javax.xml.ws.ServiceMode;
@@ -45,7 +44,6 @@ import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
-import org.w3c.dom.Node;
@WebServiceProvider
@ServiceMode(Mode.MESSAGE)
@@ -61,7 +59,7 @@ public class JAXWSServiceBindingProvider implements ServiceBindingProvider {
public JAXWSServiceBindingProvider(RuntimeEndpoint endpoint,
ServletHost servletHost,
FactoryExtensionPoint modelFactories,
- DataBindingExtensionPoint dataBindings) {
+ DataBindingExtensionPoint dataBindings, String defaultPort) {
this.endpoint = endpoint;
this.wsBinding = (WebServiceBinding)endpoint.getBinding();
@@ -69,7 +67,8 @@ public class JAXWSServiceBindingProvider implements ServiceBindingProvider {
jaxwsBindingProvider = new JAXWSBindingProvider(endpoint,
servletHost,
modelFactories,
- dataBindings);
+ dataBindings,
+ defaultPort);
}
public void start() {