summaryrefslogtreecommitdiffstats
path: root/java/sca/stest/sampleTest/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite47
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite6
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite41
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite61
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite61
5 files changed, 213 insertions, 3 deletions
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite
new file mode 100644
index 0000000000..286790a1b9
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite
@@ -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>
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite
index 4aeceb4ec7..4792ad35f3 100644
--- a/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite
@@ -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>
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite
new file mode 100644
index 0000000000..81c1e63190
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite
@@ -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>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite
new file mode 100644
index 0000000000..08ae9416f2
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.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.
+-->
+<!-- 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>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite
new file mode 100644
index 0000000000..b2d45743ac
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.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.
+-->
+<!-- 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>