diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-23 09:35:27 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-23 09:35:27 +0000 |
commit | d67dcb9c027f8aeb197f288d7c8ae115d7fd9f25 (patch) | |
tree | 99b9dc2fca311154a67652df3d81e327e4eb3b18 /branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org | |
parent | a9607c6f110013f477ab126297ac1cf1cac2ea95 (diff) |
Create 2.0-M2 release branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@757361 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org')
13 files changed, 897 insertions, 0 deletions
diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Calculator.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Calculator.composite new file mode 100644 index 0000000000..614489d2d5 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Calculator.composite @@ -0,0 +1,59 @@ +<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:x="http://x" + xmlns:calc="http://calc" + targetNamespace="http://calc" + name="Calculator"> + + <service name="CalculatorService" promote="CalculatorServiceComponent"> + <interface.java interface="calculator.CalculatorService"/> + </service> + + <component name="CalculatorServiceComponent"> + <implementation.java class="calculator.CalculatorServiceImpl"/> + <reference name="addService" multiplicity="0..1" target="AddServiceComponent"/> + <reference name="subtractService" target="SubtractServiceComponent"/> + <reference name="multiplyService" target="MultiplyServiceComponent"/> + <reference name="divideService" target="DivideServiceComponent"/> + </component> + + <component name="AddServiceComponent"> + <implementation.java class="calculator.AddServiceImpl"/> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl"/> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl"/> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl"/> + </component> + + <x:unknownElement uknAttr="attribute1"> + <y:subUnknownElement1 xmlns:y="http://y" uknAttr1="attribute2"/> + <x:subUnknownElement2 /> + </x:unknownElement> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorComponent.constrainingType b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorComponent.constrainingType new file mode 100644 index 0000000000..d6ec9b0ff0 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorComponent.constrainingType @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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. +--> +<constrainingType xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:calc="http://calc" + targetNamespace="http://calc" + name="CalculatorComponent"> + + <service name="CalculatorService"> + <interface.java class="calculator.CalculatorService" /> + </service> + + <reference name="divideService" multiplicity="1..1"> + <interface.java class="calculator.DivideService" /> + </reference> + +</constrainingType> + diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorImpl.componentType b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorImpl.componentType new file mode 100644 index 0000000000..299eb8c197 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/CalculatorImpl.componentType @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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. +--> +<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> + + <service name="CalculatorService"> + <interface.java interface="calculator.CalculatorService" /> + </service> + + <reference name="divideService"> + <interface.java interface="calculator.DivideService" /> + </reference> + +</componentType> + diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/JavaScriptReference.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/JavaScriptReference.composite new file mode 100644 index 0000000000..308ad8754b --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/JavaScriptReference.composite @@ -0,0 +1,37 @@ +<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" + name="JavaScriptReference"> + + <component name="ClientComponent"> + <implementation.java class="org.apache.tuscany.sca.implementation.script.itests.helloworld.HelloWorldProxy"/> + </component> + + <component name="ReferenceComponent"> + <tuscany:implementation.script script="org/apache/tuscany/sca/implementation/script/itests/references/reference.js"/> + <reference name="ref" target="TargetComponent" /> + </component> + + <component name="TargetComponent"> + <implementation.java class="org.apache.tuscany.sca.implementation.script.itests.references.HelloWorldTarget"/> + </component> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Multiplicity.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Multiplicity.composite new file mode 100644 index 0000000000..369cbc00bf --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/Multiplicity.composite @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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 xmlns="http://www.osoa.org/xmlns/sca/1.0" name="composite1" targetNamespace="http://temp"> + <component name="data7"> + <implementation.java class="temp.EchoImpl"/> + <service name="Echo"> + <interface.wsdl interface="http://echo.webservice#wsdl.interface(Echo)"/> + </service> + <reference multiplicity="0..n" name="reference" requires=""/> + </component> + + <reference multiplicity="1..n" name="reference" promote="" requires=""/> +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/NestedCalculator.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/NestedCalculator.composite new file mode 100644 index 0000000000..6f71f0a7f1 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/NestedCalculator.composite @@ -0,0 +1,29 @@ +<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:calc="http://calc" + targetNamespace="http://calc" + name="Calculator"> + + <component name="CalculatorServiceComponent"> + <implementation.composite xmlns:n="http://inner" name="n:InnerCalculator"/> + </component> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/RMIBindingTest.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/RMIBindingTest.composite new file mode 100644 index 0000000000..2a0bcf0f76 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/RMIBindingTest.composite @@ -0,0 +1,43 @@ +<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" + name="HelloWorldRmiComposite"> + + <service name="HelloWorldRmiService" promote="HelloWorldServiceComponent"> + <interface.java interface="helloworld.HelloWorldService"/> + <tuscany:binding.rmi uri="rmi://localhost:8099/HelloWorldRemoteService" /> + </service> + + <component name="HelloWorldServiceComponent"> + <implementation.java class="helloworld.HelloWorldImpl"/> + </component> + + <component name="HelloWorldRmiServiceComponent"> + <implementation.java class="helloworld.HelloWorldRmiImpl"/> + <reference name="extService"></reference> + </component> + + <reference name="HelloWorldRmiReference" promote="HelloWorldRmiServiceComponent/extService"> + <interface.java interface="helloworld.HelloWorldService"/> + <tuscany:binding.rmi uri="rmi://localhost:8099/HelloWorldRemoteService" /> + </reference> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllCalculator.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllCalculator.composite new file mode 100644 index 0000000000..c52c8f79a9 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllCalculator.composite @@ -0,0 +1,123 @@ +<?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 autowire="false" constrainingType="tns:CalculatorComponent" local="true" name="TestAllCalculator" policySets="sns:SecureReliablePolicy" + requires="cns:confidentiality" targetNamespace="http://calc" xmlns:tns="http://calc" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 http://www.osoa.org/xmlns/sca/1.0 " + xmlns:ext="http://extension" + xmlns:cns="http://test" xmlns:sns="http://test"> + + <include name="tns:TestAllDivide"/> + <ext:testExtension/> + + <service name="CalculatorService" promote="CalculatorServiceComponent/CalculatorService" requires="cns:confidentiality" + policySets="sns:SecureReliablePolicy"> + <ext:testExtension/> + <interface.java interface="calculator.CalculatorService" callbackInterface="calculator.CalculatorCallback" /> + <operation name="add" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" /> + + <binding.ws name="CalculatorWS" policySets="sns:SecureReliablePolicy" port="" requires="cns:confidentiality" uri="http://calc/ws"> + </binding.ws> + + <callback policySets="sns:SecureReliablePolicy" requires="cns:confidentiality"> + <ext:testExtension/> + <binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="" uri="http://calc/callback/ws"> + </binding.ws> + </callback> + </service> + + <component name="CalculatorServiceComponent" autowire="false" constrainingType="tns:CalculatorComponent" + policySets="sns:SecureReliablePolicy" requires="cns:confidentiality"> + <ext:testExtension/> + <service name="CalculatorService" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality"> + <interface.java interface="calculator.CalculatorService" callbackInterface="calculator.CalculatorCallback" /> + </service> + + <reference name="addService" target="AddServiceComponent/AddService" autowire="false" multiplicity="1..1" + policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" wiredByImpl="false"> + <ext:testExtension/> + <interface.java interface="calculator.AddService" callbackInterface="calculator.AddCallback" /> + </reference> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" /> + <reference name="divideService" target="DivideServiceComponent" /> + + <property name="round" type="xsd:boolean" many="false">true</property> + + <implementation.java class="calculator.CalculatorServiceImpl" policySets="" requires="" /> + </component> + + <component name="AddServiceComponent"> + <service name="AddService"> + <interface.java interface="calculator.AddService" /> + </service> + <implementation.java class="calculator.AddServiceImpl" /> + </component> + + <component name="NestedCompositeComponent"> + <service name="CalculatorService"> + <interface.java interface="calculator.CalculatorService" /> + </service> + <implementation.composite name="tns:Calculator" /> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl" /> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl" /> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl" /> + </component> + + <reference name="MultiplyService" promote="CalculatorServiceComponent/multiplyService" policySets="sns:SecureReliablePolicy" + requires="cns:confidentiality"> + <interface.java interface="calculator.MultiplyService" callbackInterface="calculator.MultiplyCallback" /> + + <binding.ws name="MultiplyWS" port="" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" uri="http://calc/ws"> + </binding.ws> + + <callback policySets="sns:SecureReliablePolicy" requires="cns:confidentiality"> + <binding.ws name="MultiplyCallbackWS" port="" uri="http://calc/callback/ws" policySets="sns:SecureReliablePolicy" + requires="cns:confidentiality"> + </binding.ws> + </callback> + </reference> + + <property name="prop1" xmlns:foo="http://foo" many="true" type="foo:MyComplexType"> + <ext:testExtension/> + <MyComplexPropertyValue1 xsi:type="foo:MyComplexType" attr="bar"> + <foo:a>AValue</foo:a> + <bar:b xmlns:bar="http://bar">InterestingURI</bar:b> + </MyComplexPropertyValue1> + <MyComplexPropertyValue2 xsi:type="foo:MyComplexType" attr="zing"> + <foo:a>BValue</foo:a> + <bar:b xmlns:bar="http://bar">BoringURI</bar:b> + </MyComplexPropertyValue2> + </property> + + <property name="prop2" xmlns:foo="http://foo" mustSupply="true" element="MyComplexPropertyValue1"/> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllDivide.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllDivide.composite new file mode 100644 index 0000000000..d59e69209d --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllDivide.composite @@ -0,0 +1,56 @@ +<?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 autowire="false" + constrainingType="tns:Calculator" + local="true" + name="TestAllDivide" + policySets="" requires="" + targetNamespace="http://calc" + xmlns:tns="http://calc" + xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 http://www.osoa.org/xmlns/sca/1.0 "> + + <include name="tns:CompleteDivide"/> + + <service name="DivideService" policySets="" promote="CalculatorDivideComponent/DivideService" requires=""> + <interface.java interface="calculator.DivideService" callbackInterface="calculator.DivideCallback"/> + <operation name="divide" policySets="" requires=""/> + + <binding.ws name="CalculatorWS" policySets="" port="" requires="" uri="http://calc/ws"> + <operation name="divide" policySets="" requires=""/> + </binding.ws> + + <callback policySets="" requires=""> + <binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="" uri="http://calc/callback/ws"> + <operation name="divideCallback" policySets="" requires=""/> + </binding.ws> + </callback> + </service> + + <component name="CalculatorDivideComponent" autowire="false" constrainingType="tns:CalculatorServiceComponent" policySets="" requires=""> + <service name="DivideService" policySets="" requires=""> + <interface.java interface="calculator.DivideService" callbackInterface="calculator.DivideCallback"/> + </service> + <implementation.java class="calculator.DivideImpl" policySets="" requires=""/> + </component> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllPolicyCalculator.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllPolicyCalculator.composite new file mode 100644 index 0000000000..d0f66676e0 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/TestAllPolicyCalculator.composite @@ -0,0 +1,126 @@ +<?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 autowire="false" constrainingType="tns:CalculatorComponent" local="true" name="TestAllCalculator" + requires="cns:tuscanyIntent_1" targetNamespace="http://calc" xmlns:tns="http://calc" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 http://www.osoa.org/xmlns/sca/1.0 " + xmlns:ext="http://extension" + xmlns:cns="http://test" xmlns:sns="http://test"> + + <include name="tns:TestAllDivide"/> + <ext:testExtension/> + + <service name="CalculatorService" promote="CalculatorServiceComponent/CalculatorService" requires="cns:tuscanyIntent_2 cns:tuscanyIntent_1"> + <ext:testExtension/> + <interface.java interface="calculator.CalculatorService" callbackInterface="calculator.CalculatorCallback" /> + <operation name="add" requires="cns:tuscanyIntent_6"/> + + <binding.ws name="CalculatorWS" port="" requires="cns:tuscanyIntent_3" uri="http://calc/ws"> + </binding.ws> + + <callback requires="cns:tuscanyIntent_4"> + <ext:testExtension/> + <binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="cns:tuscanyIntent_5" uri="http://calc/callback/ws"> + </binding.ws> + </callback> + </service> + + <component name="CalculatorServiceComponent" autowire="false" constrainingType="tns:CalculatorComponent" + requires="cns:tuscanyIntent_2 cns:tuscanyIntent_3"> + <ext:testExtension/> + <service name="CalculatorService" requires="cns:tuscanyIntent_3"> + <interface.java interface="calculator.CalculatorService" callbackInterface="calculator.CalculatorCallback" /> + <binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="cns:tuscanyIntent_4" uri="http://calc/callback/ws"> + </binding.ws> + <callback> + </callback> + </service> + + <reference name="addService" target="AddServiceComponent/AddService" autowire="false" multiplicity="1..1" + requires="cns:tuscanyIntent_3 cns:tuscanyIntent_2.qualified" wiredByImpl="false"> + <ext:testExtension/> + <interface.java interface="calculator.AddService" callbackInterface="calculator.AddCallback" /> + <binding.ws name="addServiceWSRef" policySets="" port="" requires="cns:tuscanyIntent_4" uri="http://calc/callback/ws"> + </binding.ws> + </reference> + <reference name="subtractService" target="SubtractServiceComponent" /> + <reference name="multiplyService" /> + <reference name="divideService" target="DivideServiceComponent" /> + + <property name="round" type="xsd:boolean" many="false">true</property> + + <implementation.java class="calculator.CalculatorServiceImpl" policySets="" requires="cns:tuscanyIntent_4" /> + </component> + + <component name="AddServiceComponent"> + <service name="AddService"> + <interface.java interface="calculator.AddService" /> + </service> + <implementation.java class="calculator.AddServiceImpl" /> + </component> + + <component name="NestedCompositeComponent"> + <service name="CalculatorService"> + <interface.java interface="calculator.CalculatorService" /> + </service> + <implementation.composite name="tns:Calculator" /> + </component> + + <component name="SubtractServiceComponent"> + <implementation.java class="calculator.SubtractServiceImpl" /> + </component> + + <component name="MultiplyServiceComponent"> + <implementation.java class="calculator.MultiplyServiceImpl" /> + </component> + + <component name="DivideServiceComponent"> + <implementation.java class="calculator.DivideServiceImpl" /> + </component> + + <reference name="MultiplyService" promote="CalculatorServiceComponent/multiplyService" + requires="cns:tuscanyIntent_2"> + <interface.java interface="calculator.MultiplyService" callbackInterface="calculator.MultiplyCallback" /> + + <binding.ws name="MultiplyWS" port="" requires="cns:tuscanyIntent_3" uri="http://calc/ws"> + </binding.ws> + + <callback policySets="sns:SecureReliablePolicy" requires="cns:tuscanyIntent_3"> + <binding.ws name="MultiplyCallbackWS" port="" uri="http://calc/callback/ws" + requires="cns:tuscanyIntent_4"> + </binding.ws> + </callback> + </reference> + + <property name="prop1" xmlns:foo="http://foo"> + <ext:testExtension/> + <MyComplexPropertyValue1 xsi:type="foo:MyComplexType" attr="bar"> + <foo:a>AValue</foo:a> + <bar:b xmlns:bar="http://bar">InterestingURI</bar:b> + </MyComplexPropertyValue1> + <MyComplexPropertyValue2 xsi:type="foo:MyComplexType" attr="zing"> + <foo:a>BValue</foo:a> + <bar:b xmlns:bar="http://bar">BoringURI</bar:b> + </MyComplexPropertyValue2> + </property> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/another_test_definitions.xml b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/another_test_definitions.xml new file mode 100644 index 0000000000..be694f289f --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/another_test_definitions.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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. +--> +<sca:definitions xmlns="http://test" + targetNamespace="http://test" + xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"> + +<!-- simple intent --> + <sca:intent name="tuscanyIntent_1" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + <sca:qualifier name="qualified" default="true"/> + </sca:intent> + + <sca:intent name="tuscanyIntent_2" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + <sca:qualifier name="qualified" default="true"/> + </sca:intent> + + <sca:intent name="tuscanyIntent_3" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_4" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + +<sca:intent name="tuscanyIntent_5" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_6" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_7" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_8" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_9" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> + + <sca:intent name="tuscanyIntent_10" + constrains="sca:binding"> + <sca:description> + Sample Intent + </sca:description> + </sca:intent> +</sca:definitions>
\ No newline at end of file diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/local.composite b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/local.composite new file mode 100644 index 0000000000..abeab18a92 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/local.composite @@ -0,0 +1,27 @@ +<?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 xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:calc="http://localcalc" + xmlns:test="http://testlocal" + targetNamespace="http://localcalc" + name="LocalCalculator" + local="true"> + +</composite> diff --git a/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/test_definitions.xml b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/test_definitions.xml new file mode 100644 index 0000000000..4616d07262 --- /dev/null +++ b/branches/sca-java-2.0-M2/modules/assembly-xml-osoa/src/test/resources/org/apache/tuscany/sca/assembly/xml/osoa/test_definitions.xml @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + * 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. +--> +<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://test" + xmlns:test="http://test" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"> + + <!-- Extension Types Metadata --> + <implementationType type="sca:implementation.java" alwaysProvides="test:logging" mayProvide="test:tracing" /> + <bindingType type="sca:binding.ws" alwaysProvides="test:confidentiality" mayProvide="test:integrity" /> + + <!-- Intents and Policysets to assume targetnamespace --> + <intent name="TestIntentOne" constrains="sca:binding"> + <description> + Test Intent + </description> + </intent> + + <intent name="TestIntentTwo" constrains="sca:binding" requires="test:TestIntentOne"> + <description> + Protect messages from unauthorized reading or modification + </description> + </intent> + + <policySet name="TestPolicySetOne" provides="test:TestIntentOne" appliesTo="sca:binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for + "basic authentication" --> + </wsp:PolicyAttachment> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for + "reliability" --> + </wsp:PolicyAttachment> + </policySet> + + <!-- POLICY SETS --> + <policySet name="SecureReliablePolicy" provides="test:confidentiality.transport test:integrity" appliesTo="sca:binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for + "basic authentication" --> + </wsp:PolicyAttachment> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for + "reliability" --> + </wsp:PolicyAttachment> + </policySet> + + <policySet name="SecureMessagingPolicies" provides="test:confidentiality" appliesTo="binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <intentMap provides="test:confidentiality" default="transport"> + <qualifier name="transport"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for "transport" alternative --> + </wsp:PolicyAttachment> + <wsp:PolicyAttachment>...</wsp:PolicyAttachment> + </qualifier> + <qualifier name="message"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for "message" alternative" --> + </wsp:PolicyAttachment> + </qualifier> + </intentMap> + </policySet> + + <policySet name="SecurityPolicy" provides="test:confidentiality" appliesTo="binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <intentMap provides="test:confidentiality" default="message"> + <qualifier name="message"> + <wsp:PolicyAttachment> + <!-- policy attachment for body encryption --> + </wsp:PolicyAttachment> + <wsp:PolicyAttachment> + <!-- policy attachment for whole message encryption --> + </wsp:PolicyAttachment> + </qualifier> + <qualifier name="transport"> + <wsp:PolicyAttachment> + <!-- policy attachment for transport encryption --> + </wsp:PolicyAttachment> + </qualifier> + </intentMap> + </policySet> + + <policySet name="BasicAuthMsgProtSecurity" provides="test:authentication test:confidentiality" appliesTo="binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0"> + <policySetReference name="test:AuthenticationPolicies" /> + <policySetReference name="test:ConfidentialityPolicies" /> + </policySet> + + <policySet name="AuthenticationPolicies" provides="test:authentication" appliesTo="binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for "basic + authentication" --> + </wsp:PolicyAttachment> + </policySet> + + <policySet name="ConfidentialityPolicies" provides="test:confidentiality" appliesTo="binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <intentMap provides="test:confidentiality" default="transport"> + <qualifier name="transport"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for "transport" + alternative --> + </wsp:PolicyAttachment> + <wsp:PolicyAttachment>...</wsp:PolicyAttachment> + </qualifier> + <qualifier name="message"> + <wsp:PolicyAttachment> + <!-- policy expression and policy subject for "message" + alternative" --> + ... + </wsp:PolicyAttachment> + </qualifier> + </intentMap> + </policySet> + + <policySet name="SecureWSPolicy" provides="test:confidentiality" appliesTo="sca:binding.ws" + xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext" + xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> + <wsp:Policy> + <wsp:ExactlyOne> + <wsp:All> + <sp:SecurityToken> + <sp:TokenType>sp:X509v3</sp:TokenType> + </sp:SecurityToken> + <sp:UsernameToken /> + <sp:SignedParts /> + <sp:EncryptedParts> + <sp:Body /> + </sp:EncryptedParts> + <sp:TransportBinding> + <sp:IncludeTimeStamp /> + </sp:TransportBinding> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + </policySet> + + <!-- profile intent --> + <intent name="reliableMessageProtection" constrains="sca:binding" requires="test:messageProtection"> + <description> + Protect messages from unauthorized reading or modification + </description> + </intent> + + <intent name="messageProtection" constrains="sca:binding" requires="test:confidentiality test:integrity"> + <description> + Protect messages from unauthorized reading or modification + </description> + </intent> + + <!-- simple intent --> + <intent name="confidentiality" constrains="sca:binding"> + <description> + Communitcation thro this binding must prevent + unauthorized users from reading the messages. + </description> + <qualifier name="transport" /> + <qualifier name="message" default="true" /> + </intent> + + <intent name="integrity" constrains="sca:binding"> + <description> + Communitcation thro this binding must prevent + unauthorized modification of the messages. + </description> + </intent> + + <intent name="authentication" constrains="sca:binding"> + <description> + Communitcation thro this binding required + Authentication. + </description> + </intent> + + <intent name="logging" constrains="sca:implementation"> + <description> + All messages to and from this implementation must be logged + </description> + </intent> + + <intent name="tracing" constrains="sca:implementation.java"> + <description> + Need to figure out some description for this + </description> + </intent> + +</definitions>
\ No newline at end of file |