diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri')
3 files changed, 14 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() { diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLPortTestCase.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLPortTestCase.java index 5c4bee15e8..80aa145098 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLPortTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLPortTestCase.java @@ -24,6 +24,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.util.List; +import java.util.Properties; import javax.wsdl.Definition; import javax.wsdl.Port; |