From 3dd7e2c4da9c80b8182a2d04dc129a67aa7910df Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:06:58 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835121 13f79535-47bb-0310-9956-ffa450edef68 --- .../ws/DefaultWebServiceBindingFactory.java | 30 --- .../tuscany/sca/binding/ws/WebServiceBinding.java | 195 ----------------- .../sca/binding/ws/WebServiceBindingFactory.java | 35 ---- .../binding/ws/addressing/EndPointReference.java | 62 ------ .../ws/impl/WebServiceBindingFactoryImpl.java | 35 ---- .../sca/binding/ws/impl/WebServiceBindingImpl.java | 230 --------------------- 6 files changed, 587 deletions(-) delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/DefaultWebServiceBindingFactory.java delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java delete mode 100644 branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java (limited to 'branches/sca-java-0.99/modules/binding-ws/src/main') diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/DefaultWebServiceBindingFactory.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/DefaultWebServiceBindingFactory.java deleted file mode 100644 index 04f8ab0d3c..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/DefaultWebServiceBindingFactory.java +++ /dev/null @@ -1,30 +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; - -import org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingFactoryImpl; - -/** - * A factory for the WSDL model. - * - * @version $Rev$ $Date$ - */ -public class DefaultWebServiceBindingFactory extends WebServiceBindingFactoryImpl implements WebServiceBindingFactory { - -} diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java deleted file mode 100644 index 3a534e3baa..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java +++ /dev/null @@ -1,195 +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; - -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Extensible; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; - - -/** - * Represents a WebService binding. - * - * @version $Rev$ $Date$ - */ -public interface WebServiceBinding extends Binding, Extensible { - - /** - * Sets the WSDL location. - * @param location the WSDL location - */ - void setLocation(String location); - - /** - * Returns the WSDL location - * @return the WSDL location - */ - String getLocation(); - - /** - * Returns the name of the WSDL service. - * - * @return the name of the WSDL service - */ - QName getServiceName(); - - /** - * Sets the name of the WSDL service. - * - * @param className the name of the WSDL service - */ - void setServiceName(QName serviceName); - - /** - * Returns the name of the WSDL port. - * - * @return the name of the WSDL port - */ - String getPortName(); - - /** - * Sets the name of the WSDL port. - * - * @param className the name of the WSDL port - */ - void setPortName(String portName); - - /** - * Returns the name of the WSDL binding. - * - * @return the name of the WSDL binding - */ - QName getBindingName(); - - /** - * Sets the name of the WSDL binding. - * - * @param className the name of the WSDL binding - */ - void setBindingName(QName bindingName); - - /** - * Returns the name of the WSDL endpoint. - * - * @return the name of the WSDL endpoint - */ - String getEndpointName(); - - /** - * Sets the name of the WSDL endpoint. - * - * @param className the name of the WSDL endpoint - */ - void setEndpointName(String endpointName); - - /** - * Returns the WSDL service - * @return the WSDL service - */ - Service getService(); - - /** - * Sets the WSDL service. - * @param service the WSDL service - */ - void setService(Service service); - - /** - * Returns the WSDL port - * @return the WSDL port - */ - Port getPort(); - - /** - * Sets the WSDL endpoint - * @param port the WSDL endpoint - */ - void setEndpoint(Port endpoint); - - /** - * Returns the WSDL endpoint - * @return the WSDL endpoint - */ - Port getEndpoint(); - - /** - * Sets the WSDL port - * @param port the WSDL port - */ - void setPort(Port port); - - /** - * Returns the WSDL binding. - * @return the WSDL binding - */ - javax.wsdl.Binding getBinding(); - - /** - * Sets the WSDL binding - * @param binding the WSDL binding - */ - void setBinding(javax.wsdl.Binding binding); - - /** - * Returns the WSDL binding. - * @return the WSDL binding - */ - WSDLDefinition getWSDLDefinition(); - - /** - * Sets the WSDL binding - * @param binding the WSDL binding - */ - void setDefinition(WSDLDefinition wsdlDefinition); - - /** - * Returns the WSDL namespace. - * @return the WSDL namespace - */ - String getNamespace(); - - /** - * Sets the WSDL namespace - * @param namspace the WSDL namspace - */ - void setNamespace(String namespace); - - /** - * Returns true if the model element is unresolved. - * - * @return true if the model element is unresolved. - */ - boolean isUnresolved(); - - /** - * Sets whether the model element is unresolved. - * - * @param unresolved whether the model element is unresolved - */ - void setUnresolved(boolean unresolved); - - InterfaceContract getBindingInterfaceContract(); - - void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract); -} diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java deleted file mode 100644 index 1ad38c69e4..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBindingFactory.java +++ /dev/null @@ -1,35 +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; - -/** - * Factory for the Web Service binding model. - * - * @version $Rev$ $Date$ - */ -public interface WebServiceBindingFactory { - - /** - * Creates a new WebService binding. - * - * @return a new WebService binding - */ - WebServiceBinding createWebServiceBinding(); - -} diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java deleted file mode 100644 index a13584a3c2..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/addressing/EndPointReference.java +++ /dev/null @@ -1,62 +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.addressing; - -import java.net.URI; -import java.util.List; - -import javax.xml.namespace.QName; - -/** - * Defines a model for WS-Addressing - * <wsa:EndpointReference> - * <wsa:Address>xs:anyURI</wsa:Address> - * <wsa:ReferenceProperties>... </wsa:ReferenceProperties> ? - * <wsa:ReferenceParameters>... </wsa:ReferenceParameters> ? - * <wsa:PortType>xs:QName</wsa:PortType> ? - * <wsa:ServiceName PortName="xs:NCName"?>xs:QName</wsa:ServiceName> ? - * <wsp:Policy> ... </wsp:Policy>* - * </wsa:EndpointReference> - * @version $Rev$ $Date$ - */ -public interface EndPointReference { - URI getAddress(); - - void setAddress(URI address); - - QName getPortType(); - - void setPortType(QName portType); - - QName getServiceName(); - - void setServiceName(QName serviceName); - - QName getPortName(); - - void setPortName(QName portName); - - List getReferenceProperties(); - - List getReferenceParameters(); - - List getPolicies(); - -} diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java deleted file mode 100644 index 8902dd04ee..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingFactoryImpl.java +++ /dev/null @@ -1,35 +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.impl; - -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory; - -/** - * A factory for the WSDL model. - * - * @version $Rev$ $Date$ - */ -public abstract class WebServiceBindingFactoryImpl implements WebServiceBindingFactory { - - public WebServiceBinding createWebServiceBinding() { - return new WebServiceBindingImpl(); - } - -} diff --git a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java b/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java deleted file mode 100644 index fd79f6a9ef..0000000000 --- a/branches/sca-java-0.99/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java +++ /dev/null @@ -1,230 +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.impl; - -import java.util.ArrayList; -import java.util.List; - -import javax.wsdl.Binding; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.interfacedef.Interface; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; - -/** - * Represents a WebService binding. - * - * @version $Rev$ $Date$ - */ -public class WebServiceBindingImpl implements WebServiceBinding { - private String name; - private String uri; - private boolean unresolved; - private List extensions = new ArrayList(); - - private String location; - private Binding binding; - private Service service; - private Port port; - private Port endpoint; - private QName bindingName; - private String portName; - private QName serviceName; - private String endpointName; - private WSDLDefinition wsdlDefinition; - private String wsdlNamespace; - private InterfaceContract bindingInterfaceContract; - - protected WebServiceBindingImpl() { - } - - public String getName() { - return name; - } - - public String getURI() { - return uri; - } - - public void setName(String name) { - this.name = name; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - - public List getExtensions() { - return extensions; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public Binding getBinding() { - return binding; - } - - public QName getBindingName() { - if (isUnresolved()) { - return bindingName; - } else if (binding != null) { - return binding.getQName(); - } else { - return null; - } - } - - public String getEndpointName() { - if (isUnresolved()) { - return endpointName; - } else if (endpoint != null) { - //TODO support WSDL 2.0 - return endpoint.getName(); - } else { - return null; - } - } - - public Port getEndpoint() { - return endpoint; - } - - public Port getPort() { - return port; - } - - public String getPortName() { - if (isUnresolved()) { - return portName; - } else if (port != null) { - return port.getName(); - } else { - return null; - } - } - - public Service getService() { - return service; - } - - public QName getServiceName() { - if (isUnresolved()) { - return serviceName; - } else if (service != null) { - return service.getQName(); - } else { - return null; - } - } - - public void setBinding(Binding binding) { - this.binding = binding; - } - - public void setBindingName(QName bindingName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.bindingName = bindingName; - } - - public void setEndpoint(Port endpoint) { - this.endpoint = endpoint; - } - - public void setEndpointName(String endpointName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.endpointName = endpointName; - } - - public void setPort(Port port) { - this.port = port; - } - - public void setPortName(String portName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.portName = portName; - } - - public void setService(Service service) { - this.service = service; - } - - public void setServiceName(QName serviceName) { - if (!isUnresolved()) { - throw new IllegalStateException(); - } - this.serviceName = serviceName; - } - - public WSDLDefinition getWSDLDefinition() { - if (wsdlDefinition == null) { - Interface iface = bindingInterfaceContract.getInterface(); - if (iface instanceof WSDLInterface) { - wsdlDefinition = ((WSDLInterface) iface).getWsdlDefinition(); - } - } - return wsdlDefinition; - } - - public void setDefinition(WSDLDefinition wsdlDefinition) { - this.wsdlDefinition = wsdlDefinition; - } - - public String getNamespace() { - return wsdlNamespace; - } - - public void setNamespace(String namespace) { - this.wsdlNamespace = namespace; - } - - public InterfaceContract getBindingInterfaceContract() { - return bindingInterfaceContract; - } - - public void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract) { - this.bindingInterfaceContract = bindingInterfaceContract; - } - -} -- cgit v1.2.3