summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite
blob: 424cec3e8ad61b3e9880b279492ff234a35894e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?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" local="true" name="TestAllCalculator" 
    requires="cns:tuscanyIntent_1" targetNamespace="http://calc" xmlns:tns="http://calc"
    xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912 "
    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" 
        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">
        <value xsi:type="foo:MyComplexType" attr="bar">
            <foo:a>AValue</foo:a>
            <bar:b xmlns:bar="http://bar">InterestingURI</bar:b>
        </value>
        <value xsi:type="foo:MyComplexType" attr="zing">
            <foo:a>BValue</foo:a>
            <bar:b xmlns:bar="http://bar">BoringURI</bar:b>
        </value>
    </property>

</composite>