diff options
Diffstat (limited to 'branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java')
-rw-r--r-- | branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java b/branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java index e6ca8e20a8..b1923bdf3c 100644 --- a/branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java +++ b/branches/sca-java-1.5.1/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java @@ -46,17 +46,15 @@ import org.apache.tuscany.sca.work.WorkScheduler; public class Axis2BindingProviderFactory implements BindingProviderFactory<WebServiceBinding> { private ModelFactoryExtensionPoint modelFactories; - private ServletHost servletHost; + private List<ServletHost> hosts; private List<PolicyHandlerTuple> policyHandlerClassnames = null; private DataBindingExtensionPoint dataBindings; private WorkScheduler workScheduler; public Axis2BindingProviderFactory(ExtensionPointRegistry extensionPoints) { ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class); - List<ServletHost> hosts = servletHosts.getServletHosts(); - if (!hosts.isEmpty()) { - this.servletHost = hosts.get(0); - } + hosts = servletHosts.getServletHosts(); + modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); policyHandlerClassnames = PolicyHandlerDefinitionsLoader.loadPolicyHandlerClassnames(); dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class); @@ -74,6 +72,12 @@ public class Axis2BindingProviderFactory implements BindingProviderFactory<WebSe public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, WebServiceBinding binding) { + ServletHost servletHost = null; + + if (!hosts.isEmpty()) { + servletHost = hosts.get(0); + } + return new Axis2ServiceBindingProvider(component, service, binding, servletHost, modelFactories, policyHandlerClassnames, dataBindings, workScheduler); |