summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-16 12:54:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-16 12:54:46 +0000
commita46908c4cdf082333ef9f59f6d6a37bdc34987e7 (patch)
tree528a213805b89bf9c029136e9d5f0ab4f8d7d8f5 /sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org
parentda27c633992d4e42a8e0d4b03da2ebe9c9e7a36a (diff)
Split the jaxws ws binding into a generic bit and an RI specific bit. Problems committing the deletes from binding-ws-runtime-ri so doing it in stages
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@934855 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java2
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java (renamed from sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSServiceBindingProvider.java)25
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProviderFactory.java68
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSReferenceBindingProvider.java74
4 files changed, 6 insertions, 163 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
index fcf4f472ff..65bcc0cfd9 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
@@ -51,7 +51,7 @@ import org.apache.tuscany.sca.invocation.Message;
import org.w3c.dom.Node;
/**
- * Axis2BindingInvoker uses an Axis2 OperationClient to invoke a remote web service
+ * Uses JAXWS Dispatch to invoke a remote web service
*
* @version $Rev$ $Date$
*/
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java
index 0a27eea3ce..98aa0b8d2a 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java
@@ -26,7 +26,6 @@ import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.Endpoint;
import javax.xml.ws.Provider;
import javax.xml.ws.ServiceMode;
import javax.xml.ws.WebServiceProvider;
@@ -42,7 +41,6 @@ import org.apache.tuscany.sca.interfacedef.util.FaultException;
import org.apache.tuscany.sca.invocation.InvocationChain;
import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.oasisopen.sca.ServiceRuntimeException;
import org.w3c.dom.Element;
@@ -50,15 +48,14 @@ import org.w3c.dom.Node;
@WebServiceProvider
@ServiceMode(Mode.MESSAGE)
-public class JAXWSServiceBindingProvider implements ServiceBindingProvider, Provider<SOAPMessage> {
+public class JAXWSBindingProvider implements Provider<SOAPMessage> {
private MessageFactory messageFactory;
private RuntimeEndpoint endpoint;
private WebServiceBinding wsBinding;
- private Endpoint wsEndpoint;
private javax.xml.soap.MessageFactory soapMessageFactory;
private SOAPFactory soapFactory;
- public JAXWSServiceBindingProvider(RuntimeEndpoint endpoint,
+ public JAXWSBindingProvider(RuntimeEndpoint endpoint,
ServletHost servletHost,
FactoryExtensionPoint modelFactories,
DataBindingExtensionPoint dataBindings) {
@@ -98,29 +95,17 @@ public class JAXWSServiceBindingProvider implements ServiceBindingProvider, Prov
// calculation (see above comment). For now just fake the addition of binding
// specific processing by adding a root if it's not already present
if (!wsBinding.getURI().startsWith("http://")) {
- wsBinding.setURI("http://localhost:8080" + wsBinding.getURI());
+ wsBinding.setURI("http://localhost:8085" + wsBinding.getURI());
}
System.out.println("Service URI: " + wsBinding.getURI());
}
public void start() {
- // TODO - turn on Axis2 JAXWS support
-
-
- wsEndpoint = Endpoint.create(this);
- wsEndpoint.publish(wsBinding.getURI());
+ // TODO - do we need this?
}
public void stop() {
- wsEndpoint.stop();
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return wsBinding.getBindingInterfaceContract();
- }
-
- public boolean supportsOneWayInvocation() {
- return true;
+ // TODO - do we need this?
}
public SOAPMessage invoke(SOAPMessage request) {
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProviderFactory.java
deleted file mode 100644
index 54d1ba90a8..0000000000
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProviderFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.jaxws;
-
-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.databinding.DataBindingExtensionPoint;
-import org.apache.tuscany.sca.host.http.ServletHost;
-import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
-import org.apache.tuscany.sca.provider.BindingProviderFactory;
-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;
-
-/**
- * Axis2BindingProviderFactory
- *
- * @version $Rev$ $Date$
- */
-
-public class JAXWSBindingProviderFactory implements BindingProviderFactory<WebServiceBinding> {
-
- private FactoryExtensionPoint modelFactories;
- private ServletHost servletHost;
- private DataBindingExtensionPoint dataBindings;
-
- public JAXWSBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
- ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
- List<ServletHost> hosts = servletHosts.getServletHosts();
- if (!hosts.isEmpty()) {
- this.servletHost = hosts.get(0);
- }
- modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
- dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
- }
-
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) {
- return new JAXWSReferenceBindingProvider(endpointReference, modelFactories, dataBindings);
- }
-
- public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
- return new JAXWSServiceBindingProvider(endpoint, servletHost, modelFactories, dataBindings);
- }
-
- public Class<WebServiceBinding> getModelType() {
- return WebServiceBinding.class;
- }
-}
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSReferenceBindingProvider.java
deleted file mode 100644
index 99a297e074..0000000000
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSReferenceBindingProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.binding.ws.jaxws;
-
-import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
-import org.oasisopen.sca.ServiceRuntimeException;
-import org.w3c.dom.Node;
-
-public class JAXWSReferenceBindingProvider implements ReferenceBindingProvider {
-
- private javax.xml.soap.MessageFactory messageFactory;
- private WebServiceBinding wsBinding;
-
- public JAXWSReferenceBindingProvider(RuntimeEndpointReference endpointReference,
- FactoryExtensionPoint modelFactories,
- DataBindingExtensionPoint dataBindings) {
-
- this.messageFactory = modelFactories.getFactory(javax.xml.soap.MessageFactory.class);
- this.wsBinding = (WebServiceBinding) endpointReference.getBinding();
-
- // A WSDL document should always be present in the binding
- if (wsBinding.getWSDLDocument() == null) {
- throw new ServiceRuntimeException("No WSDL document for " + endpointReference.getURI());
- }
-
- // Set to use the DOM data binding
- InterfaceContract contract = wsBinding.getBindingInterfaceContract();
- if (contract.getInterface() != null) {
- contract.getInterface().resetDataBinding(Node.class.getName());
- }
- }
-
- public void start() {
- }
-
- public void stop() {
- }
-
- public InterfaceContract getBindingInterfaceContract() {
- return wsBinding.getBindingInterfaceContract();
- }
-
- public boolean supportsOneWayInvocation() {
- return true;
- }
-
- public Invoker createInvoker(Operation operation) {
- return new JAXWSBindingInvoker(operation, null, messageFactory, wsBinding);
- }
-
-}