diff options
Diffstat (limited to 'branches/sca-java-0.99/itest/old/interop-soap-round2-client')
11 files changed, 711 insertions, 0 deletions
diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml new file mode 100644 index 0000000000..ab4c27ed68 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/pom.xml @@ -0,0 +1,77 @@ +<?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. + --> +<project> + <parent> + <groupId>org.apache.tuscany.testing</groupId> + <artifactId>tuscany-interop-clients</artifactId> + <version>0.1-integration-incubating-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>interop-client-webserviceSOAPRound2</artifactId> + <packaging>jar</packaging> + <name>Tuscany Interop Testing - Clients - SOAP Builders Round 2 Interop Test</name> + + <properties> + <ws.type>axis2</ws.type> + </properties> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-plugin</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <configuration> + <schemaFile>${basedir}/src/main/resources/wsdl/interoptestdoclit.wsdl</schemaFile> + <noNotification>true</noNotification> + <noContainer>true</noContainer> + <noInterfaces>true</noInterfaces> + <noUnsettable>true</noUnsettable> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.tuscany.sca.extensions.axis2.plugins</groupId> + <artifactId>tuscany-plugin-wsdl2java</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <configuration> + <wsdlFile>${basedir}/src/main/resources/wsdl/interoptestdoclit.wsdl</wsdlFile> + <javaPackage>org.soapinterop.wsdl.interop.test.doc.lit</javaPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java new file mode 100644 index 0000000000..ca3031c646 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java @@ -0,0 +1,44 @@ +package org.apache.tuscany.test.interop.client; +import org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType; + +/* + * 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. + */ + + +/** + * + * + */ +public class InteropTestDocLit { + private WSDLInteropTestDocLitPortType interopTestDocLitPortType =null; + /** + * @param args + */ + public static void main(String[] args) { + + + } + WSDLInteropTestDocLitPortType getInteropTestDocLitPortType() { + return interopTestDocLitPortType; + } + void setInteropTestDocLitPortType(WSDLInteropTestDocLitPortType interopTestDocLitPortType) { + this.interopTestDocLitPortType = interopTestDocLitPortType; + } + +} diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/README.txt b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-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-round2-client/src/main/resources/META-INF/sca/default.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl new file mode 100644 index 0000000000..0ed260399c --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl @@ -0,0 +1,38 @@ +<?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="InteropClient"> + + <dbsdo:import.sdo location="wsdl/interoptestdoclit.wsdl"/> + <dbsdo:import.sdo factory="org.soapinterop.xsd.XsdFactory"/> + + <reference name="RemoteInteropDocService"> +<!-- + <interface.wsdl interface="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.interface(WSDLInteropTestDocLitPortType)"/> + <binding.ws port="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.endpoint(WSDLInteropTestDocLitService/WSDLInteropTestDocLitPort)"/> +--> + + <interface.java interface="org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType"/> + <binding.ws endpoint="http://soapinterop.org/WSDLInteropTestDocLit#wsdl.endpoint(WSDLInteropTestDocLitService/WSDLInteropTestDocLitPort)" + location="wsdl/interoptestdoclit.wsdl" /> + </reference> + +</composite>
\ No newline at end of file diff --git a/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-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-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl new file mode 100644 index 0000000000..21df676937 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-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-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-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-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl new file mode 100644 index 0000000000..1e8c3b1589 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-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-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl new file mode 100644 index 0000000000..e08039cedb --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl @@ -0,0 +1,155 @@ +<?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. + --> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + elementFormDefault="qualified"> + <complexType name="ArrayOfstring_literal"> + <sequence> + <element maxOccurs="unbounded" minOccurs="1" name="string" type="xsd:string"/> + </sequence> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varFloat" type="xsd:float"/> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + </all> + </complexType> + + <element name="echoStringParam" type="xsd:string"/> + + <element name="echoStringReturn" type="xsd:string"/> + <element name="echoStringArrayParam" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStringArrayReturn" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStructParam" type="xsd1:SOAPStruct"/> + + <element name="echoStructReturn" type="xsd1:SOAPStruct"/> + </schema> + </types> + <message name="echoString"> + <part element="xsd1:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringReturn" name="result"/> + </message> + <message name="echoStringArray"> + <part element="xsd1:echoStringArrayParam" name="a"/> + </message> + <message name="echoStringArrayResponse"> + <part element="xsd1:echoStringArrayReturn" name="result"/> + </message> + <message name="echoStruct"> + <part element="xsd1:echoStructParam" name="a"/> + </message> + <message name="echoStructResponse"> + <part element="xsd1:echoStructReturn" name="result"/> + </message> + <message name="echoVoid"/> + <message name="echoVoidResponse"/> + + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArray" name="echoStringArray"/> + <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStruct" name="echoStruct"/> + <output message="tns:echoStructResponse" name="echoStructResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoid" name="echoVoid"/> + <output message="tns:echoVoidResponse" name="echoVoidResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStringArray"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringArrayResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStruct"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStructResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoVoid"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoVoidResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <service name="WSDLInteropTestDocLitService"> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <soap:address + location="http://mssoapinterop.org/stkv3/wsdl/interopTestDocLit.wsdl"/> + <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-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java new file mode 100644 index 0000000000..da70d5b3a6 --- /dev/null +++ b/branches/sca-java-0.99/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java @@ -0,0 +1,133 @@ +/* + * 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 java.util.Arrays; +import java.util.List; + +import org.apache.tuscany.test.SCATestCase; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.soapinterop.wsdl.interop.test.doc.lit.WSDLInteropTestDocLitPortType; +import org.soapinterop.xsd.ArrayOfstring_literal; +import org.soapinterop.xsd.SOAPStruct; +import org.soapinterop.xsd.XsdPackage; + +import commonj.sdo.helper.DataFactory; + +/** + * This test case is part of the tuscany interop tests. This is a reduced version of the SOAPBuilders InteropTest test, document/literal mode. This + * version has operations such as echoString, echoArrayOfString and echoStruct. + * + * <p> + * The WSDL for the external service used in this test case can be downloaded from http://www.mssoapinterop.org/stkV3/wsdl/InteropTestDocLit.wsdl. + * This is part of the WSDL interop test from Microsoft and more details aobout this test case are found at + * http://www.mssoapinterop.org/stkV3/wsdl/WSDLInterop-0118.htm + */ +public class InteropTestDocLitTestCase extends SCATestCase { + + private WSDLInteropTestDocLitPortType doc = null; + + private DataFactory dataFactory; + + + protected void setUp() throws Exception { + setApplicationSCDL(InteropTestDocLit.class, "META-INF/sca/default.scdl"); + addExtension("test.extensions", InteropTestDocLit.class.getClassLoader().getResource("META-INF/tuscany/extensions/test-extensions.scdl")); + + super.setUp(); + + // Get the SDO DataFactory + dataFactory = DataFactory.INSTANCE; + + // Locate the service to test + doc = locateInteropDocService(); + } + + /** + * Locate the interop service to test + * + * @return + */ + protected WSDLInteropTestDocLitPortType locateInteropDocService() { + + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + return compositeContext.locateService(WSDLInteropTestDocLitPortType.class, "RemoteInteropDocService"); + + } + + /** + * test echo void + * + * @throws RemoteException + */ + public void testEchoVoid() throws RemoteException { + doc.echoVoid(); + assertTrue(true); + } + + /** + * test echo string + * + * @throws RemoteException + */ + public void testEchoString() throws RemoteException { + String input = "a test string"; + String output = doc.echoString(input); + assertEquals(input, output); + } + + /** + * test echo string + * + * @throws RemoteException + */ + public void testEchoStringArray() throws RemoteException { + + ArrayOfstring_literal input = (ArrayOfstring_literal) dataFactory.create(ArrayOfstring_literal.class); + List inStrings = Arrays.asList(new String[] { "petra", "sue" }); + input.set(XsdPackage.ARRAY_OFSTRING_LITERAL__STRING, inStrings); + + ArrayOfstring_literal output = doc.echoStringArray(input); + + List outStrings = output.getString(); + assertNotNull(outStrings); + assertEquals(2, outStrings.size()); + assertEquals("petra", outStrings.get(0)); + assertEquals("sue", outStrings.get(1)); + } + + /** + * test echo struct + * + * @throws RemoteException + */ + public void testEchoStruct() throws RemoteException { + SOAPStruct input = (SOAPStruct) dataFactory.create(SOAPStruct.class); + input.setVarInt(200); + input.setVarFloat(.002f); + input.setVarString("Hello"); + SOAPStruct output = doc.echoStruct(input); + assertEquals(input.getVarInt(), output.getVarInt()); + assertEquals(input.getVarFloat(), output.getVarFloat()); + assertEquals(input.getVarString(), output.getVarString()); + } + +} |