Author: edwardsmj
Date: Fri Jan 16 03:02:07 2009
New Revision: 734972

URL: http://svn.apache.org/viewvc?rev=734972&view=rev
Log:
ASM_0016_TestCase & ASM_0017_TestCase added

Added:
    tuscany/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java
    
tuscany/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java
Modified:
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite

Added: 
tuscany/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java?rev=734972&view=auto
==============================================================================
--- tuscany/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java 
(added)
+++ tuscany/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,42 @@
+/*
+ * 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 test;
+
+/**
+ * A superset of the basic test service interface
+ * @author MikeEdwards
+ *
+ */
+public interface Service1Superset {
+       
+       /**
+        * Method for invoking testcase service
+        * @param input - input parameter(s) as a String
+        * @return - output data as a String
+        */
+       public String operation1( String input );
+       
+       /**
+        * A second method for invoking a testcase service
+        * @param input - input parameter(s) as a String
+        * @return - output data as a String
+        */
+       public String operation2( String input );
+
+}

Added: 
tuscany/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,42 @@
+/*
+ * 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 test;
+
+import org.osoa.sca.annotations.*;
+
+/**
+ * Simple Java component implementation for business interface Service1Superset
+ * @author MikeEdwards
+ *
+ */
+...@service(Service1Superset.class)
+public class service1SupersetImpl implements Service1Superset {
+       
+       @Property
+       public String serviceName = "service1";
+
+       public String operation1(String input) {
+               return serviceName + " operation1 invoked";
+       }
+
+       public String operation2(String input) {
+               return serviceName + " operation2 invoked";
+       }
+
+}

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,47 @@
+<?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.    
+-->
+<!-- An example of a composite which has a single service and
+     a single reference, but where the reference has a binding
+     applied to it, with a target service identified   -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TestComposite10">
+           
+       <service name="Service1" promote="Composite10Component1/Service1">
+               <interface.java interface="test.Service1"/>
+       </service>
+
+    <property name="serviceName" type="string"/>
+ 
+    <component name="Composite10Component1">
+               <implementation.java class="test.service1Impl2"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"/>
+        </service>
+        <property name="serviceName" source="$serviceName"/>
+    </component>
+    
+    <reference name="Reference1" promote="Composite10Component1/reference1">
+        <interface.java interface="test.Service1"/>
+        <binding.sca uri="TestComponent2/Service1"/>
+    </reference>
+    
+</composite>

Modified: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite?rev=734972&r1=734971&r2=734972&view=diff
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite 
(original)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite 
Fri Jan 16 03:02:07 2009
@@ -24,13 +24,13 @@
            xmlns:sample="http://oasis/tests";
            name="TestComposite4">
            
-       <service name="Service1" promote="TestComponent1/Service1">
+       <service name="Service1" promote="Composite4Component1/Service1">
                <interface.java interface="test.Service1"/>
        </service>
 
     <property name="serviceName" type="string"/>
  
-    <component name="TestComponent1">
+    <component name="Composite4Component1">
                <implementation.java class="test.service1Impl2"/>
         <service name="Service1">
                <interface.java interface="test.Service1"/>
@@ -38,7 +38,7 @@
         <property name="serviceName" source="$serviceName"/>
     </component>
     
-    <reference name="Reference1" promote="TestComponent1/reference1">
+    <reference name="Reference1" promote="Composite4Component1/reference1">
         <interface.java interface="test.Service1"/>
     </reference>
     

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,41 @@
+<?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 that provides a single service with the extended
+     Service1Superset interface -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TestComposite9">
+           
+       <service name="Service1" 
promote="Composite9Component1/Service1Superset">
+               <interface.java 
interface="test.Service1Superset"></interface.java>
+       </service>
+
+    <property name="serviceName" type="string"/>
+ 
+    <component name="Composite9Component1">
+               <implementation.java class="test.service1SupersetImpl"/>
+        <service name="Service1Superset">
+               <interface.java 
interface="test.Service1Superset"></interface.java>
+        </service>
+        <property name="serviceName" source="$serviceName"/>
+    </component>
+
+</composite>

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,61 @@
+<?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.    
+-->
+<!-- Tests that the interface declared by the <interface/> child element 
+     of a <reference/> of a <component/> is a compatible superset of the 
+     interface declared on the corresponding <reference/> of the 
+     componentType of the <implementation/> of the <component/> -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:tns="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TEST_ASM_0016">
+           
+    <component name="TestClient">
+               <implementation.composite name="tns:TestClient_0002"/>
+               <service name="TestInvocation">
+                       <interface.java interface="test.TestInvocation"/>
+            <binding.ws/>
+               </service>
+        <reference name="reference1" target="TestComponent1/Service1" />
+        <property name="testName">ASM_0016</property>
+    </component>
+    
+    <component name="TestComponent1">
+               <implementation.composite name="tns:TestComposite4"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"/>
+        </service>
+        <property name="serviceName">service1</property>
+        <reference name="Reference1" target="TestComponent2/Service1">
+            <!-- Component type has the interface = test.Service1 - here
+                 we use an interface that is a superset -->
+               <interface.java interface="test.Service1Superset"/>
+        </reference>
+    </component>
+    
+    <component name="TestComponent2">
+               <implementation.composite name="tns:TestComposite9"/>
+        <service name="Service1">
+               <interface.java 
interface="test.Service1Superset"></interface.java>
+        </service>
+        <property name="serviceName">service2</property>
+    </component>    
+    
+</composite>

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,61 @@
+<?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.    
+-->
+<!-- Tests that where a <reference/> of a <component/> has no <binding/> 
+     child element, but the corresponding <reference/> element in the 
+     componentType does have a binding child element, the <binding/> 
+     from the componentType is used for the reference -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:tns="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TEST_ASM_0017">
+           
+    <component name="TestClient">
+               <implementation.composite name="tns:TestClient_0002"/>
+               <service name="TestInvocation">
+                       <interface.java interface="test.TestInvocation"/>
+            <binding.ws/>
+               </service>
+        <reference name="reference1" target="TestComponent1/Service1" />
+        <property name="testName">ASM_0017</property>
+    </component>
+    
+    <component name="TestComponent1">
+               <implementation.composite name="tns:TestComposite10"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"/>
+        </service>
+        <property name="serviceName">service1</property>
+        <!-- ComponentType has a binding for this reference that 
+             identifies the target for this reference -->
+        <reference name="Reference1">
+               <interface.java interface="test.Service1"/>
+        </reference>
+    </component>
+    
+    <component name="TestComponent2">
+               <implementation.composite name="tns:TestComposite1"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"></interface.java>
+        </service>
+        <property name="serviceName">service2</property>
+    </component>    
+    
+</composite>

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,46 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0016_TestCase, which tests that the interface declared 
+ * by the <interface/> child element of a <reference/> of a <component/> 
+ * is a compatible superset of the interface declared on the corresponding 
+ * <reference/> of the componentType of the <implementation/> of the 
<component/> 
+ */
+public class ASM_0016_TestCase extends BaseJAXWSTestCase {
+
+ 
+    protected TestConfiguration getTestConfiguration() {
+       TestConfiguration config = new TestConfiguration();
+       config.testName                 = "ASM_0016";
+       config.input                    = "request";
+       config.output                   = "ASM_0016 request service1 operation1 
invoked service2 operation1 invoked";
+       config.composite                = "Test_ASM_0016.composite";
+       config.testServiceName  = "TestClient";
+       config.testClass                = ASM_0002_Client.class;
+       config.serviceInterface = TestInvocation.class;
+       return config;
+    }
+    
+} // end class Test_ASM_0003

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java?rev=734972&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java 
Fri Jan 16 03:02:07 2009
@@ -0,0 +1,47 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0017_TestCase, which tests that where a <reference/> 
+ * of a <component/> has no <binding/> child element, but the 
+ * corresponding <reference/> element in the componentType does have 
+ * a binding child element, the <binding/> from the componentType is 
+ * used for the reference 
+ */
+public class ASM_0017_TestCase extends BaseJAXWSTestCase {
+
+ 
+    protected TestConfiguration getTestConfiguration() {
+       TestConfiguration config = new TestConfiguration();
+       config.testName                 = "ASM_0017";
+       config.input                    = "request";
+       config.output                   = "ASM_0017 request service1 operation1 
invoked service2 operation1 invoked";
+       config.composite                = "Test_ASM_0017.composite";
+       config.testServiceName  = "TestClient";
+       config.testClass                = ASM_0002_Client.class;
+       config.serviceInterface = TestInvocation.class;
+       return config;
+    }
+    
+} // end class Test_ASM_0003


Reply via email to