diff options
Diffstat (limited to 'java')
6 files changed, 309 insertions, 0 deletions
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite new file mode 100644 index 0000000000..f0d6162e25 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite @@ -0,0 +1,48 @@ +<?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. +--> +<!-- A composite which has a <composite/> <reference/> that declares an interface + which is a superset of the interface declared by the <component/> <reference/> + promoted by the composite reference --> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://oasis/tests" + xmlns:sample="http://oasis/tests" + name="TestComposite21">
+ + <service name="Service1" promote="Composite21Component1/Service1"> + <interface.java interface="test.Service1"/> + </service> + + <property name="serviceName" type="string"/>
+ + <component name="Composite21Component1"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service> + <property name="serviceName" source="$serviceName"/> + <reference name="reference1"/> + </component> + + <!-- reference declares a superset interface --> + <reference name="Reference1" promote="Composite21Component1/reference1"> + <interface.java interface="test.Service1Superset"/> + </reference> + +</composite> diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite new file mode 100644 index 0000000000..79c07fb678 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite @@ -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. +--> +<!-- A composite which has a <composite/> <reference/> that has no interface + declared that promotes 2 <component/> <reference/>s that have different + interfaces declared on them --> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://oasis/tests" + xmlns:sample="http://oasis/tests" + name="TestComposite22">
+ + <service name="Service1" promote="Composite22Component1/Service1"> + <interface.java interface="test.Service1"/> + </service> + + <property name="serviceName" type="string"/>
+ + <component name="Composite22Component1"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service> + <property name="serviceName" source="$serviceName"/> + <reference name="reference1"> + <interface.java interface="test.Service1"/> + </reference> + </component> + + <component name="Composite22Component2"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1"> + <interface.java interface="test.Service1"/> + </service> + <property name="serviceName">Composite11-C2</property> + <reference name="reference1"> + <interface.java interface="test.Service1Superset"/> + </reference> + </component> + + <!-- @promote deliberately incorrect - component names are non-existent --> + <reference name="Reference1" + promote="Composite22Component1/reference1 Composite22Component2/reference1"> + </reference> + +</composite> diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite new file mode 100644 index 0000000000..a67b19a52d --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite @@ -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.
+-->
+<!-- Tests that a <composite/> <reference/> can declare an <interface/>
+ that is a compatible superset of the <interface/> declared by each
+ <component/> <reference/> promoted by the composite reference -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:tns="http://oasis/tests"
+ xmlns:test="http://oasis/tests"
+ name="TEST_ASM_6007">
+
+ <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_6007</property>
+ </component>
+
+ <!-- Component which uses a composite which has a <reference/> element which
+ declares a superset interface -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite21"/>
+ <service name="Service1"/>
+ <property name="serviceName">service1</property>
+ <reference name="Reference1" target="TestComponent2/Service1"/>
+ </component>
+
+ <!-- Implementation of the superset service -->
+ <component name="TestComponent2">
+ <implementation.composite name="tns:TestComposite9"/>
+ <service name="Service1"/>
+ <property name="serviceName">service2</property>
+ </component>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite new file mode 100644 index 0000000000..afc490cb67 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite @@ -0,0 +1,54 @@ +<?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 <composite/> <reference/> has no <interface/> subelement,
+ and that <reference/> promotes 2 or more <component/> <reference/>s, that the
+ <interface/> declared on each of the <component/> <reference/>s are the same -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:tns="http://oasis/tests"
+ xmlns:test="http://oasis/tests"
+ name="TEST_ASM_6008">
+
+ <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_6008</property>
+ </component>
+
+ <!-- Component which uses a composite which has a <reference/> element which
+ promotes multiple component references which use different interfaces -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite22"/>
+ <service name="Service1"/>
+ <property name="serviceName">service1</property>
+ <reference name="Reference1" target="TestComponent2/Service1"/>
+ </component>
+
+ <component name="TestComponent2">
+ <implementation.composite name="tns:TestComposite1"/>
+ <service name="Service1"/>
+ <property name="serviceName">service2</property>
+ </component>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java new file mode 100644 index 0000000000..751a5bd3b2 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java @@ -0,0 +1,45 @@ +/*
+ * 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_6007_TestCase, which tests that a <composite/> <reference/>
+ * can declare an <interface/> that is a compatible superset of the <interface/>
+ * declared by each <component/> <reference/> promoted by the composite reference
+ */
+public class ASM_6007_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6007";
+ config.input = "request";
+ config.output = "ASM_6007 request service1 operation1 invoked service2 operation1 invoked";
+ config.composite = "Test_ASM_6007.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6007
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java new file mode 100644 index 0000000000..59bf04bb14 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java @@ -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_6008_TestCase, which tests that where a <composite/> <reference/>
+ * has no <interface/> subelement, and that <reference/> promotes 2 or more
+ * <component/> <reference/>s, that the <interface/> declared on each of the
+ * <component/> <reference/>s are the same
+ */
+public class ASM_6008_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6008";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6008.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6008
|