summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org
diff options
context:
space:
mode:
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);
- }
-
-}