Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

META-INF/sca-contribution.xml defines the deployable composites for the given SCA contribution (the WAR in the webapp case). Tuscany servlet filter will bootstrap the SCA domain and deploy these composites.

Anchor
META-INF/sca-contribution.xml
META-INF/sca-contribution.xml

Code Block
2xml
titleCalculatorMETA-INF/calculator.composite
borderStylesolid
<?xml version="1.0" encoding="UTF-8"?>
<composite<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
              targetNamespace="http://sample"
              xmlns:sample="http://sample">
           name<deployable composite="sample:Calculator"/>
</contribution>

Anchor
Calculator.composite
Calculator.composite

Code Block
2xml
titleCalculator.composite
borderStylesolid
    <component name="CalculatorServiceComponent">
		<implementation.java class="calculator.CalculatorServiceImpl"/>
        <reference name="addService" ><?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           <interface.java interfacetargetNamespace="calculator.AddService" />http://sample"
            <binding.ws urixmlns:sample="http://localhost:8080/sample-calculator-ws-webapp/AddServiceComponent"/>
        </reference>
        <reference name="subtractService" target="SubtractServiceComponent"></reference>Calculator">

        <reference<component name="multiplyService" target="MultiplyServiceComponent"></reference>CalculatorServiceComponent">
		<implementation.java class="calculator.CalculatorServiceImpl"/>
        <reference name="divideServiceaddService" target="DivideServiceComponent"></reference>
    </component>

  >
  <component name="AddServiceComponent">
        <implementation<interface.java classinterface="calculator.AddServiceImplAddService" />
        <service name="AddService">
    <binding.ws uri="http://localhost:8080/sample-calculator-ws-webapp/AddServiceComponent"/>
        </reference>
        <interface.java<reference interfacename="calculator.AddServicesubtractService" />target="SubtractServiceComponent"></reference>
        <reference name="multiplyService" target="MultiplyServiceComponent"></reference>
  <binding.ws/>
      <reference  </service>name="divideService" target="DivideServiceComponent"></reference>
    </component>

    <component name="SubtractServiceComponentAddServiceComponent">
        <implementation.java class="calculator.SubtractServiceImplAddServiceImpl"/>
        <service name="AddService">
             <interface.java interface="calculator.AddService" />
            <binding.ws/>
        </service>
    </component>

    <component name="MultiplyServiceComponentSubtractServiceComponent">
        <implementation.java class="calculator.MultiplyServiceImplSubtractServiceImpl"/>
    </component>

    <component name="DivideServiceComponentMultiplyServiceComponent">
        <implementation.java class="calculator.DivideServiceImplMultiplyServiceImpl"/>
    </component>

</composite>

...

Code Block
2xml
titleMETA-INF/calculator.composite
borderStylesolid

<?xml version="1.0" encoding="UTF-8"?>
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"    <component name="DivideServiceComponent">
              targetNamespace="http://sample"
              xmlns:sample="http://sample"<implementation.java class="calculator.DivideServiceImpl"/>
   <deployable composite="sample:Calculator"/> </component>

</contribution>composite>

3. Devloping a Tuscany web application for Geronimo using Maven and Eclipse

...