diff options
Diffstat (limited to 'branches/sca-java-0.99/itest/old/interop-soap-client/src')
10 files changed, 703 insertions, 0 deletions
diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java new file mode 100644 index 0000000000..1b3a6a6c1d --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java @@ -0,0 +1,49 @@ +/* + * 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.test.interop.client; + +import java.rmi.RemoteException; + +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; +import org.soapinterop.ComplexDocument; +import org.soapinterop.DocTestPortType; +import org.soapinterop.SimpleDocument1; +import org.soapinterop.SingleTag; + +/** + * This class implements the DocTest service component. + */ +@Service(DocTestPortType.class) +//FIXME workaround for JIRA TUSCANY-41 +@Scope("COMPOSITE") +public class LoopbackInteropDocServiceComponentImpl implements DocTestPortType { + + public ComplexDocument ComplexDocument(ComplexDocument param0) throws RemoteException { + return param0; + } + + public SimpleDocument1 SimpleDocument(SimpleDocument1 param4) throws RemoteException { + return param4; + } + + public SingleTag SingleTag(SingleTag param2) throws RemoteException { + return param2; + } +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt new file mode 100644 index 0000000000..9b26d1690a --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt @@ -0,0 +1,35 @@ +Apache Tuscany M1 build (May, 2006) +=================================== + +http://incubator.apache.org/tuscany/ + +Tuscany is an effort undergoing incubation at the Apache Software Foundation +(ASF), sponsored by the Web Services PMC. + +Incubation is required of all newly accepted projects until a further review +indicates that the infrastructure, communications, and decision making process +have stabilized in a manner consistent with other successful ASF projects. + +While incubation status is not necessarily a reflection of the completeness or +stability of the code, it does indicate that the project has yet to be fully +endorsed by the ASF. + + +Support +------- + +Any problem with this release can be reported to the Tuscany mailing list +or in the JIRA issue tracker. + +Mailing list subscription: + tuscany-dev-subscribe@ws.apache.org + +Jira: + http://issues.apache.org/jira/browse/Tuscany + + +Thank you for using Tuscany! + + +The Tuscany Team. + diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl new file mode 100644 index 0000000000..d286a5137f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
+ name="interop.client">
+<!--
+ <import.sdo factory="org.soapinterop.SoapinteropFactory"/>
+ <import.wsdl wsdlLocation="wsdl/interopdoc.wsdl"/>
+ -->
+ <!-- import.sdo location="wsdl/interopdoc.wsdl" -->
+ <dbsdo:import.sdo factory="org.soapinterop.SoapinteropFactory"/>
+
+ <component name="LoopbackInteropDocService">
+ <implementation.java class="org.apache.tuscany.test.interop.client.LoopbackInteropDocServiceComponentImpl"/>
+ </component>
+
+ <reference name="RemoteInteropDocService">
+ <!-- interface.wsdl interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ -->
+ <interface.java interface="org.soapinterop.DocTestPortType"/>
+
+ <binding.ws endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)" location="wsdl/interopdoc.wsdl"/>
+ </reference>
+
+ <reference name="LocalHostInteropDocService">
+ <!-- interface.wsdl interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ -->
+ <interface.java interface="org.soapinterop.DocTestPortType"/>
+
+
+ <binding.ws endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)"
+ location="wsdl/interopdoc.wsdl"/>
+ </reference>
+
+</composite>
\ No newline at end of file diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl new file mode 100644 index 0000000000..fb208f56ab --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<!-- Axis2 based WebService binding extension --> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" + name="org.apache.tuscany.binding.axis2.WebServiceBinding"> + + <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> + <group>axis2</group> + <name>axis2-kernel</name> + <version>SNAPSHOT</version> + </dependency> + + <component name="webservice.bindingLoader"> + <system:implementation.system class="org.apache.tuscany.binding.axis2.WebServiceBindingLoader"/> + </component> + + <component name="webservice.axis2.bindingBuilder"> + <system:implementation.system class="org.apache.tuscany.binding.axis2.Axis2BindingBuilder"/> + </component> + +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl new file mode 100644 index 0000000000..92a6be450f --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" + name="org.apache.tuscany.databinding.Axiom"> + + <component name="databinding.axiom"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.AxiomDataBinding" /> + </component> + + <component name="transformer.XMLStreamReader2OMElement"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.XMLStreamReader2OMElement" /> + </component> + + <component name="transformer.OMElement2XMLStreamReader"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2XMLStreamReader" /> + </component> + + <component name="transformer.String2OMElement"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.String2OMElement" /> + </component> + + <component name="transformer.OMElement2String"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2String" /> + </component> + + <component name="transformer.Object2OMElement"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.Object2OMElement" /> + </component> + + <component name="transformer.OMElement2Object"> + <system:implementation.system class="org.apache.tuscany.databinding.axiom.OMElement2Object" /> + </component> +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl new file mode 100644 index 0000000000..61753384b4 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<!-- + import.sdo configuration + + $Rev: 431086 $ $Date: 2006-08-12 13:58:17 -0700 (Sat, 12 Aug 2006) $ +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" + name="org.apache.tuscany.databinding.sdo"> + + <!-- import.sdo element loader implementations --> + <component name="elementLoader.import.sdo"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.ImportSDOLoader"/> + </component> + + <component name="databinding.sdo"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.SDODataBinding" /> + </component> + + <component name="transformer.DataObject2String"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.DataObject2String"/> + </component> + <component name="transformer.DataObject2XMLStreamReader"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.DataObject2XMLStreamReader"/> + </component> + <component name="transformer.XMLDocument2String"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLDocument2String"/> + </component> + <component name="transformer.String2DataObject"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.String2DataObject"/> + </component> + <component name="transformer.XMLDocument2XMLStreamReader"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLDocument2XMLStreamReader"/> + </component> + <component name="transformer.XMLStreamReader2DataObject"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLStreamReader2DataObject"/> + </component> + <component name="transformer.XMLStreamReader2XMLDocument"> + <system:implementation.system class="org.apache.tuscany.databinding.sdo.XMLStreamReader2XMLDocument"/> + </component> + +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl new file mode 100644 index 0000000000..84538dab8b --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<!-- + Default system configuration for the launcher environment. + + $Rev: 440894 $ $Date: 2006-09-06 15:52:01 -0700 (Wed, 06 Sep 2006) $ +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT" + name="org.apache.tuscany.idl.WSDL"> + + <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> + <group>wsdl4j</group> + <name>wsdl4j</name> + <version>1.5.2</version> + </dependency> + <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"> + <group>org.apache.ws.commons</group> + <name>XmlSchema</name> + <version>SNAPSHOT</version> + </dependency> + + <component name="interface.wsdl.Loader"> + <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLLoader" /> + </component> + + <component name="wsdl.Registry"> + <system:implementation.system class="org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistryImpl" initLevel="40" /> + </component> + + <component name="xmlSchema.registry"> + <system:implementation.system class="org.apache.tuscany.idl.wsdl.XMLSchemaRegistryImpl" initLevel="35" /> + </component> + + <component name="interface.wsdl.Introspector"> + <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospectorImpl" initLevel="40" /> + </component> + +</composite>
\ No newline at end of file diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl new file mode 100644 index 0000000000..bda64f749e --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<composite name="test.extensions" xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"> + <include name="org.apache.tuscany.interface.wsdl" scdlLocation="includes/interface.wsdl.scdl"/> + <include name="org.apache.tuscany.databinding.axiom" scdlLocation="includes/databinding.axiom.scdl"/> + <include name="org.apache.tuscany.databinding.sdo" scdlLocation="includes/databinding.sdo.scdl"/> + <include name="org.apache.tuscany.binding.axis2" scdlLocation="includes/binding.axis2.scdl"/> +</composite> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl new file mode 100644 index 0000000000..89a8a2e3de --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl @@ -0,0 +1,185 @@ +<?xml version="1.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. + --> +<definitions name="InteropTestDoc" targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <types> + + <xsd:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/" xmlns:interop="http://soapinterop.org/"> + + <xsd:element name="SingleTag"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="SingleTag"/> + <xsd:element name="SingleTagResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="SimpleDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="SimpleDocument"> + <xsd:simpleContent> + <xsd:extension base="xsd:string"/> + </xsd:simpleContent> + </xsd:complexType> + <xsd:element name="SimpleDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="ComplexDocument"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:complexType name="ComplexDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="simpleDoc" type="interop:ArrayOfSimpleDocument"/> + <xsd:element minOccurs="0" maxOccurs="1" name="child" type="interop:ChildDocument"/> + </xsd:sequence> + <xsd:attribute name="AnAttribute" type="xsd:string"/> + </xsd:complexType> + <xsd:complexType name="ArrayOfSimpleDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="SimpleDocument" nillable="true" type="interop:SimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="ChildDocument"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="childSimpleDoc" type="interop:ArrayOfSimpleDocument"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="ComplexDocumentResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:schema> + + </types> + + <message name="SingleTagSoapIn"> + <part name="parameters" element="tns:SingleTag"/> + </message> + <message name="SingleTagSoapOut"> + <part name="outputDoc" element="tns:SingleTagResponse"/> + </message> + <message name="SimpleDocumentSoapIn"> + <part name="parameters" element="tns:SimpleDocument"/> + </message> + <message name="SimpleDocumentSoapOut"> + <part name="outputDoc" element="tns:SimpleDocumentResponse"/> + </message> + <message name="ComplexDocumentSoapIn"> + <part name="parameters" element="tns:ComplexDocument"/> + </message> + <message name="ComplexDocumentSoapOut"> + <part name="outputDoc" element="tns:ComplexDocumentResponse"/> + </message> + + <portType name="DocTestPortType"> + + <operation name="SingleTag"> + <input message="tns:SingleTagSoapIn"/> + <output message="tns:SingleTagSoapOut"/> + </operation> + <operation name="SimpleDocument"> + <input message="tns:SimpleDocumentSoapIn"/> + <output message="tns:SimpleDocumentSoapOut"/> + </operation> + <operation name="ComplexDocument"> + <input message="tns:ComplexDocumentSoapIn"/> + <output message="tns:ComplexDocumentSoapOut"/> + </operation> + + </portType> + + <binding name="doc_test_binding" type="tns:DocTestPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + + <operation name="SingleTag"> + <soap:operation soapAction="http://soapinterop.org/SingleTag"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="SimpleDocument"> + <soap:operation soapAction="http://soapinterop.org/SimpleDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + <operation name="ComplexDocument"> + <soap:operation soapAction="http://soapinterop.org/ComplexDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + </binding> + + <service name="interopDocSvc"> + + <port name="interopDocPort" binding="tns:doc_test_binding"> + <soap:address location="http://www.whitemesa.net/interopdoc"/> + <!-- soap:address location="http://mssoapinterop.org/asmx/simple.asmx"/ --> + <!-- soap:address location="http://easysoap.sourceforge.net/cgi-bin/interopserver"/ --> + <!-- soap:address location="http://www.mssoapinterop.org/remoting/ServiceAllTypes.soap"/ --> + <http-conf:client xmlns:http-conf="http://celtix.objectweb.org/transports/http/configuration" + AllowChunking="false"/> + </port> + + </service> + +</definitions> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java b/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java new file mode 100644 index 0000000000..6b74f04283 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java @@ -0,0 +1,155 @@ +/* + * 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.test.interop.client; + +import java.rmi.RemoteException; + +import org.apache.tuscany.test.SCATestCase; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.soapinterop.ArrayOfSimpleDocument; +import org.soapinterop.ChildDocument; +import org.soapinterop.ComplexDocument; +import org.soapinterop.DocTestPortType; +import org.soapinterop.SimpleDocument; +import org.soapinterop.SimpleDocument1; +import org.soapinterop.SingleTag; + +import commonj.sdo.helper.DataFactory; + +public class InteropDocClientTestCase extends SCATestCase { + + private DataFactory dataFactory; + + private DocTestPortType interopDoc; + + public InteropDocClientTestCase(){}; + + public void testSingleTag() throws RemoteException { + + // Create the input + SingleTag input = (SingleTag) dataFactory.create(SingleTag.class); + + // Invoke the service + SingleTag output = interopDoc.SingleTag(input); + + // Test the results + assertNotNull(output); + + } + + public void testSimpleDocument() throws RemoteException { + + // Create the input + SimpleDocument1 input = (SimpleDocument1) dataFactory.create(SimpleDocument1.class); + input.setValue("123"); + + // Invoke the service + SimpleDocument1 output = interopDoc.SimpleDocument(input); + + // Test the results + assertNotNull(output); + assertEquals("123", output.getValue()); + + } + + public void testComplexDocument() throws RemoteException { + + // Create the input + ComplexDocument input = (ComplexDocument) dataFactory.create(ComplexDocument.class); + input.setAnAttribute("789"); + ChildDocument childDocument = (ChildDocument) dataFactory.create(ChildDocument.class); + SimpleDocument simpleDocument = (SimpleDocument) dataFactory.create(SimpleDocument.class); + ; + SimpleDocument1 simpleDocument1 = (SimpleDocument1) dataFactory.create(SimpleDocument1.class); + ; + simpleDocument.setSimpleDocument(simpleDocument1); + simpleDocument1.setValue("456"); + ArrayOfSimpleDocument arrayOfSimpleDocument = (ArrayOfSimpleDocument) dataFactory.create(ArrayOfSimpleDocument.class); + ; + arrayOfSimpleDocument.getSimpleDocument().add(simpleDocument1); + childDocument.setChildSimpleDoc(arrayOfSimpleDocument); + input.setChild(childDocument); + + // Invoke the service + ComplexDocument output = interopDoc.ComplexDocument(input); + + // Test the results + assertNotNull(output); + assertEquals("789", output.getAnAttribute()); + assertNotNull(output.getChild()); + assertNotNull(output.getChild().getChildSimpleDoc()); + + // FIXME Add more tests of the output document + + } + + protected void setUp() throws Exception { + + setApplicationSCDL(LoopbackInteropDocServiceComponentImpl.class, "META-INF/sca/default.scdl"); + + addExtension("test.extensions", getClass().getClassLoader().getResource("META-INF/tuscany/extensions/test-extensions.scdl")); + /* + addExtension("org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistry", getClass().getClassLoader().getResource( + + "META-INF/tuscany/interface.wsdl.scdl")); + + addExtension("org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospector", getClass().getClassLoader().getResource( + "META-INF/tuscany/interface.wsdl.scdl")); + + + + addExtension("org.apache.tuscany.binding.axis2.WebServiceBinding", getClass().getClassLoader().getResource( + "META-INF/tuscany/binding.axis2.scdl")); + addExtension("org.apache.tuscany.databinding.sdo", getClass().getClassLoader().getResource("META-INF/tuscany/databinding.sdo.scdl")); + */ + super.setUp(); + + // Get the SDO DataFactory + dataFactory = DataFactory.INSTANCE; + + // Locate the service to test + interopDoc = locateInteropDocService(); + + } + + /** + * Locate the interop service to test + * + * @return + */ + protected DocTestPortType locateInteropDocService() { + String interopLocation = System.getProperty("interopLocation"); + + // Valid service names are: + // RemoteInteropDocService: the live interop Web Service + // LocalHostInteropDocService: the interop Web Service hosted by Tuscany on localhost + // LoopbackInteropDocServiceComponent: a dummy loopback service component + + // To specify the service name run mvn -interopLocation="Remote" + + if (interopLocation == null) + interopLocation = "Remote"; + + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + + return (DocTestPortType) compositeContext.locateService(DocTestPortType.class, interopLocation + "InteropDocService"); + } + +} |