summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.1/modules
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-18 09:24:18 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-18 09:24:18 +0000
commit3df4c3fd37f15f75805a15c0b74f9e4c9e87b811 (patch)
treeaf106be536b5e7a21f79e0adf30e839a19c814d7 /branches/sca-java-1.3.1/modules
parentdfadb1bb4402417a64d2d72551c85eb3803a50ac (diff)
merge fix from trunk to 1.3.1 for TUSCANY-2514: make tuscany-host-{tomcat,jetty} optional for binding.ws clients
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686707 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3.1/modules')
-rw-r--r--branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java7
-rw-r--r--branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java3
-rw-r--r--branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java4
-rw-r--r--branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java2
4 files changed, 7 insertions, 9 deletions
diff --git a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
index 83df3481ce..3be3c5b600 100644
--- a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
+++ b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
@@ -54,9 +54,7 @@ public class Axis2BindingProviderFactory implements BindingProviderFactory<WebSe
public Axis2BindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
List<ServletHost> hosts = servletHosts.getServletHosts();
- if (hosts.isEmpty()) {
- throw new ServiceRuntimeException("No Servlet host is avaible for HTTP web services");
- } else {
+ if (!hosts.isEmpty()) {
this.servletHost = hosts.get(0);
}
modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
@@ -68,8 +66,7 @@ public class Axis2BindingProviderFactory implements BindingProviderFactory<WebSe
RuntimeComponentReference reference,
WebServiceBinding binding) {
return new Axis2ReferenceBindingProvider(component, reference, binding,
- servletHost, modelFactories,
- policyHandlerClassnames, dataBindings);
+ modelFactories, policyHandlerClassnames, dataBindings);
}
public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
diff --git a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
index d4e3f47e6d..9fdb2615c2 100644
--- a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
+++ b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
@@ -44,7 +44,6 @@ public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider {
public Axis2ReferenceBindingProvider(RuntimeComponent component,
RuntimeComponentReference reference,
WebServiceBinding wsBinding,
- ServletHost servletHost,
ModelFactoryExtensionPoint modelFactories,
Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames,
DataBindingExtensionPoint dataBindings) {
@@ -63,7 +62,7 @@ public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider {
contract.getInterface().resetDataBinding(OMElement.class.getName());
}
- axisClient = new Axis2ServiceClient(component, reference, wsBinding, servletHost, messageFactory, policyHandlerClassnames);
+ axisClient = new Axis2ServiceClient(component, reference, wsBinding, messageFactory, policyHandlerClassnames);
}
public void start() {
diff --git a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
index e35972ea00..eac047d23f 100644
--- a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
+++ b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
@@ -49,6 +49,10 @@ public class Axis2ServiceBindingProvider implements ServiceBindingProvider {
Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames,
DataBindingExtensionPoint dataBindings) {
+ if (servletHost == null) {
+ throw new ServiceRuntimeException("No Servlet host is avaible for HTTP web services");
+ }
+
MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class);
this.wsBinding = wsBinding;
diff --git a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
index f972b412b0..9bb88698b9 100644
--- a/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
+++ b/branches/sca-java-1.3.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
@@ -78,7 +78,6 @@ import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
import org.apache.tuscany.sca.assembly.AbstractContract;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
@@ -107,7 +106,6 @@ public class Axis2ServiceClient {
public Axis2ServiceClient(RuntimeComponent component,
AbstractContract contract,
WebServiceBinding wsBinding,
- ServletHost servletHost,
MessageFactory messageFactory,
Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames) {