diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-08 23:10:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-08 23:10:31 +0000 |
commit | 2410d8844182e057fd59ea4139b9a7d61413bbea (patch) | |
tree | bf16f0379149936193778e805a2d88c3cad69959 /java/sca/modules/binding-ws-axis2/src/main | |
parent | 755737f1cef0f827f6c87c3d55560adebdb776f0 (diff) |
Make the ServiceDiscovery pluggable and add support for OSGi-based service discoverer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@675040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws-axis2/src/main')
5 files changed, 9 insertions, 34 deletions
diff --git a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java index 83df3481ce..eb5f01a70b 100644 --- a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java +++ b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.ws.axis2; import java.util.List; -import java.util.Map; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; @@ -27,7 +26,6 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint; -import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.policy.util.PolicyHandlerDefinitionsLoader; import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple; import org.apache.tuscany.sca.provider.BindingProviderFactory; @@ -48,7 +46,7 @@ public class Axis2BindingProviderFactory implements BindingProviderFactory<WebSe private ModelFactoryExtensionPoint modelFactories; private ServletHost servletHost; - private Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames = null; + private List<PolicyHandlerTuple> policyHandlerClassnames = null; private DataBindingExtensionPoint dataBindings; public Axis2BindingProviderFactory(ExtensionPointRegistry extensionPoints) { diff --git a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java index d4e3f47e6d..8f8cb5f392 100644 --- a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java +++ b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java @@ -19,13 +19,12 @@ package org.apache.tuscany.sca.binding.ws.axis2; import java.util.List; -import java.util.Map; import org.apache.axiom.om.OMElement; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; +import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; @@ -46,7 +45,7 @@ public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider { WebServiceBinding wsBinding, ServletHost servletHost, ModelFactoryExtensionPoint modelFactories, - Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames, + List<PolicyHandlerTuple> policyHandlerClassnames, DataBindingExtensionPoint dataBindings) { MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class); diff --git a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java index e35972ea00..3bdf33ea28 100644 --- a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java +++ b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java @@ -19,15 +19,12 @@ package org.apache.tuscany.sca.binding.ws.axis2; import java.util.List; -import java.util.Map; - -import javax.xml.namespace.QName; import org.apache.axiom.om.OMElement; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; +import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple; @@ -46,7 +43,7 @@ public class Axis2ServiceBindingProvider implements ServiceBindingProvider { WebServiceBinding wsBinding, ServletHost servletHost, ModelFactoryExtensionPoint modelFactories, - Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames, + List<PolicyHandlerTuple> policyHandlerClassnames, DataBindingExtensionPoint dataBindings) { MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class); diff --git a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java index f972b412b0..d81aaf374c 100644 --- a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java +++ b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java @@ -22,8 +22,6 @@ import static org.apache.tuscany.sca.binding.ws.axis2.AxisPolicyHelper.SOAP12_IN import static org.apache.tuscany.sca.binding.ws.axis2.AxisPolicyHelper.isIntentRequired; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; @@ -39,16 +37,9 @@ import javax.wsdl.BindingOperation; import javax.wsdl.Definition; import javax.wsdl.Import; import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPBinding; import javax.wsdl.extensions.soap.SOAPOperation; import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.extensions.soap12.SOAP12Binding; -import javax.wsdl.factory.WSDLFactory; import javax.xml.namespace.QName; import javax.xml.stream.FactoryConfigurationError; import javax.xml.stream.XMLInputFactory; @@ -80,8 +71,6 @@ 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; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.policy.PolicySet; @@ -101,7 +90,7 @@ public class Axis2ServiceClient { private AbstractContract contract; private WebServiceBinding wsBinding; private ServiceClient serviceClient; - Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames = null; + List<PolicyHandlerTuple> policyHandlerClassnames = null; private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>(); public Axis2ServiceClient(RuntimeComponent component, @@ -109,7 +98,7 @@ public class Axis2ServiceClient { WebServiceBinding wsBinding, ServletHost servletHost, MessageFactory messageFactory, - Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames) { + List<PolicyHandlerTuple> policyHandlerClassnames) { this.component = component; this.contract = contract; diff --git a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java index de6f7c2c21..7939ff0c67 100644 --- a/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java +++ b/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.ws.axis2; -import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.net.URI; import java.net.URISyntaxException; @@ -44,21 +43,14 @@ import javax.wsdl.extensions.UnknownExtensibilityElement; import javax.wsdl.extensions.soap.SOAPAddress; import javax.wsdl.extensions.soap12.SOAP12Address; import javax.xml.namespace.QName; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.transform.dom.DOMSource; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAPHeader; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; import org.apache.axis2.addressing.AddressingConstants; -import org.apache.axis2.addressing.EndpointReferenceHelper; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; import org.apache.axis2.deployment.util.Utils; @@ -129,7 +121,7 @@ public class Axis2ServiceProvider { private ConfigurationContext configContext; private JMSSender jmsSender; private JMSListener jmsListener; - private Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames = null; + private List<PolicyHandlerTuple> policyHandlerClassnames = null; private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>(); private Map<String, Port> urlMap = new HashMap<String, Port>(); private Map<String, String> addressMap = new HashMap<String, String>(); @@ -165,7 +157,7 @@ public class Axis2ServiceProvider { WebServiceBinding wsBinding, ServletHost servletHost, MessageFactory messageFactory, - Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames) { + List<PolicyHandlerTuple> policyHandlerClassnames) { this.component = component; this.contract = contract; |