Author: jsdelfino
Date: Sun May 7 00:58:16 2006
New Revision: 404741
URL: http://svn.apache.org/viewcvs?rev=404741&view=rev
Log:
TUSCANY-248 - adding SOAP builders round 2 interop test case
Added:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/
(with props)
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
(with props)
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/java/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/sca.module
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/interoptestdoclit.wsdl
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
(with props)
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/resources/
Modified:
incubator/tuscany/java/testing/interop/clients/pom.xml
Modified: incubator/tuscany/java/testing/interop/clients/pom.xml
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/interop/clients/pom.xml?rev=404741&r1=404740&r2=404741&view=diff
==============================================================================
--- incubator/tuscany/java/testing/interop/clients/pom.xml (original)
+++ incubator/tuscany/java/testing/interop/clients/pom.xml Sun May 7 00:58:16
2006
@@ -29,6 +29,7 @@
<modules>
<module>webserviceInteropDoc</module>
+ <module>webserviceSOAPRound2</module>
<module>webserviceXSQ</module>
</modules>
Propchange: incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun May 7 00:58:16 2006
@@ -0,0 +1,13 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+.settings
+.deployables
+.wtpmodules
+
Added:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml?rev=404741&view=auto
==============================================================================
--- incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
(added)
+++ incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
Sun May 7 00:58:16 2006
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors,
as applicable.
+ *
+ * Licensed 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</groupId>
+ <artifactId>tuscany-testing-interop-clients</artifactId>
+ <version>SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
<artifactId>tuscany-testing-interop-client-webserviceSOAPRound2</artifactId>
+ <packaging>jar</packaging>
+ <name>Tuscany Interop Testing - Clients - SOAP Builders Round 2 Interop
Test</name>
+ <version>SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-core</artifactId>
+ <version>${pom.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca.containers</groupId>
+ <artifactId>tuscany-container-java</artifactId>
+ <version>${pom.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca.bindings</groupId>
+ <artifactId>tuscany-binding-axis2</artifactId>
+ <version>${pom.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-sdo-plugin</artifactId>
+ <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</groupId>
+ <artifactId>tuscany-sca-plugin</artifactId>
+ <executions>
+ <execution>
+ <configuration>
+
<wsdlFile>${basedir}/src/main/resources/wsdl/interoptestdoclit.wsdl</wsdlFile>
+ <javaPackage>org.soapinterop</javaPackage>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <configuration>
+ <!-- This does not work, the test cases
do not see the property -->
+ <!--
+ <systemProperties>
+
<interopServiceName>RemoteInteropDocService</interopServiceName>
+ </systemProperties>
+ -->
+ <!-- This does not work either -->
+ <!--
+ <systemProperties>
+ <property>
+
<name>interopServiceName</name>
+
<value>RemoteInteropDocService</value>
+ </property>
+ </systemProperties>
+ -->
+ </configuration>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/sca.module
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/sca.module?rev=404741&view=auto
==============================================================================
---
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/sca.module
(added)
+++
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/sca.module
Sun May 7 00:58:16 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as
applicable.
+
+ Licensed 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="InteropClient">
+
+ <import.sdo factory="org.soapinterop.xsd.XsdFactory"/>
+ <import.wsdl location="wsdl/interoptestdoclit.wsdl"
namespace="http://soapinterop.org/WSDLInteropTestDocLit"/>
+
+ <externalService name="RemoteInteropDocService">
+ <interface.wsdl
interface="http://soapinterop.org/WSDLInteropTestDocLit#WSDLInteropTestDocLitPortType"/>
+ <binding.ws
port="http://soapinterop.org/WSDLInteropTestDocLit#WSDLInteropTestDocLitPort"/>
+ </externalService>
+
+</module>
Added:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/interoptestdoclit.wsdl
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/interoptestdoclit.wsdl?rev=404741&view=auto
==============================================================================
---
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/interoptestdoclit.wsdl
(added)
+++
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/main/resources/wsdl/interoptestdoclit.wsdl
Sun May 7 00:58:16 2006
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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"/>
+ </port>
+ </service>
+</definitions>
Added:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java?rev=404741&view=auto
==============================================================================
---
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
(added)
+++
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
Sun May 7 00:58:16 2006
@@ -0,0 +1,110 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as
applicable.
+ *
+ * Licensed 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 junit.framework.TestCase;
+
+import org.apache.tuscany.core.client.TuscanyRuntime;
+import org.osoa.sca.CurrentModuleContext;
+import org.soapinterop.WSDLInteropTestDocLitPortType;
+import org.soapinterop.xsd.SOAPStruct;
+
+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 TestCase {
+
+ private TuscanyRuntime tuscany = null;
+ private WSDLInteropTestDocLitPortType doc = null;
+ private DataFactory dataFactory;
+ private ClassLoader oldCL;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ // Required to allow the SDO runtime to use the correct classloader
+ oldCL=Thread.currentThread().getContextClassLoader();
+
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+ // Obtain Tuscany runtime
+ tuscany = new TuscanyRuntime("interopclient", null);
+
+ // Start the runtime
+ tuscany.start();
+
+ // Get the SDO DataFactory
+ dataFactory=DataFactory.INSTANCE;
+
+ // Locate the service to test
+ doc = locateInteropDocService();
+ }
+
+ /**
+ * Locate the interop service to test
+ * @return
+ */
+ protected WSDLInteropTestDocLitPortType locateInteropDocService() {
+ return
(WSDLInteropTestDocLitPortType)CurrentModuleContext.getContext().locateService("RemoteInteropDocServiceComponent");
+ }
+
+ /**
+ * 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 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());
+ }
+
+
+ protected void tearDown() throws Exception {
+ // Stop the runtime
+ tuscany.stop();
+
+ Thread.currentThread().setContextClassLoader(oldCL);
+
+ super.tearDown();
+ }
+
+}
Propchange:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/testing/interop/clients/webserviceSOAPRound2/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date