diff options
author | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-18 16:07:23 +0000 |
---|---|---|
committer | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-18 16:07:23 +0000 |
commit | 27cc4ecce579d6e1d11982d792e13f6e1fe80f94 (patch) | |
tree | 094a4835d0daf4e864c1efbadd0b0d40d69ef443 /java/sca/stest/sampleTest/src/main | |
parent | 4beea938ef828047e528724b5ff3adff6b25619a (diff) |
Updates to clean the testcase code and to add a Base JAXWS client and to base the set of testcases off the Base JAXWS client
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@727758 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/stest/sampleTest/src/main')
8 files changed, 105 insertions, 32 deletions
diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java index 5f35b31380..060d82ab9e 100644 --- a/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java @@ -2,6 +2,8 @@ package test; import org.osoa.sca.annotations.Service;
+import test.TestInvocation;
+
/**
* Basic test initiation class
* @author MikeEdwards
diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java index 0c3a566508..54e05aef74 100644 --- a/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java @@ -4,6 +4,8 @@ import org.osoa.sca.annotations.Service; import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Property;
+import test.TestInvocation;
+
/**
* Test initiation class with a single reference of multiplicity 1..1
* @author MikeEdwards
diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java index c4d4be149f..dc60c0fcde 100644 --- a/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java @@ -4,6 +4,8 @@ import org.osoa.sca.annotations.Service; import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Property;
+import test.TestInvocation;
+
import java.util.List;
/**
diff --git a/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java b/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java index 689cf19352..c546171b09 100644 --- a/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java +++ b/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java @@ -1,5 +1,7 @@ package test;
+import javax.jws.WebService;
+import javax.jws.WebMethod;
import org.osoa.sca.annotations.Remotable;
/**
@@ -15,6 +17,7 @@ public interface TestInvocation { * @param input - input parameter(s) as a String
* @return - output data as a String
*/
+ @WebMethod
public String invokeTest( String input );
}
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestClient.wsdl b/java/sca/stest/sampleTest/src/main/resources/TestClient.wsdl new file mode 100644 index 0000000000..05d933e04f --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestClient.wsdl @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="TestInvocationService" targetNamespace="http://test/"
+xmlns:test="http://test/"
+xmlns="http://test/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://test/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="invokeTest">
+<xs:complexType>
+<xs:sequence>
+<xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="invokeTestResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="invokeTest">
+ <wsdl:part name="invokeTest" element="test:invokeTest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="invokeTestResponse">
+ <wsdl:part name="invokeTestResponse" element="test:invokeTestResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="TestInvocation">
+ <wsdl:operation name="invokeTest">
+ <wsdl:input message="test:invokeTest">
+ </wsdl:input>
+ <wsdl:output message="test:invokeTestResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="TestInvocationBinding" type="test:TestInvocation">
+ <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="invokeTest">
+ <SOAP:operation soapAction=""/>
+ <wsdl:input>
+ <SOAP:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="TestInvocationService">
+ <wsdl:port name="TestInvocationPort" binding="test:TestInvocationBinding">
+ <SOAP:address location="http://localhost:8080/TestClient"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite index 28e4b56ef3..590e147a47 100644 --- a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite @@ -25,7 +25,8 @@ <component name="TestClient">
<implementation.java class="test.ASM_0002_Client"/>
<service name="TestInvocation">
- <interface.java interface="test.TestInvocation"/>
+ <interface.java interface="test.TestInvocation"/> + <binding.ws/>
</service>
<reference name="reference1" target="TestComponent1/Service1" />
<property name="testName">ASM_0002</property>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite index 577d4eb049..3c59dd39a2 100644 --- a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite @@ -17,6 +17,9 @@ * specific language governing permissions and limitations * under the License. --> +<!-- Test case that verifies that an implementation with a reference with multiplicity 1..n can + be validly wired to 3 target services and invoke them all correctly. +--> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://oasis/tests" xmlns:sample="http://oasis/tests" @@ -25,7 +28,8 @@ <component name="TestClient">
<implementation.java class="test.ASM_0003_Client"/>
<service name="TestInvocation">
- <interface.java interface="test.TestInvocation"/>
+ <interface.java interface="test.TestInvocation"/> + <binding.ws/>
</service>
<reference name="reference1" target="TestComponent1/Service1 TestComponent2/Service1 TestComponent3/Service1" />
<property name="testName">ASM_0003</property>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite index c5cc0494a3..ec0a98d75a 100644 --- a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite @@ -1,45 +1,46 @@ -<?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. +<?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.
-->
<!-- Test that verifies that a reference with multiplicity 1..1 which is provided
- with multiple wire targets in the component configuration is marked as an error --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://oasis/tests" - xmlns:sample="http://oasis/tests" + with multiple wire targets in the component configuration is marked as an error -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:sample="http://oasis/tests"
name="TEST_ASM_0004">
- +
<component name="TestClient">
<implementation.java class="test.ASM_0002_Client"/>
<service name="TestInvocation">
<interface.java interface="test.TestInvocation"/>
+ <binding.ws/>
</service>
<reference name="reference1" target="TestComponent1/Service1 TestComponent2/Service1 TestComponent3/Service1" />
<property name="testName">ASM_0004</property>
</component>
- - <component name="TestComponent1"> - <implementation.java class="test.service1Impl"/> +
+ <component name="TestComponent1">
+ <implementation.java class="test.service1Impl"/>
<service name="Service1">
<interface.java interface="test.Service1"></interface.java>
</service>
- <property name="serviceName">service1</property> + <property name="serviceName">service1</property>
</component>
<component name="TestComponent2">
@@ -56,6 +57,6 @@ <interface.java interface="test.Service1"></interface.java>
</service>
<property name="serviceName">service3</property>
- </component> - -</composite> + </component>
+
+</composite>
|