Service-Component Architectures
by Arunava Chatterjee

Example 1:

(a)
<component name="AddServiceComponent">
  <implementation.java class="calculator.AddServiceImpl"/>
</component>

(b)
  <component name="CalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl"/>
  <reference name="addService">AddServiceComponent</reference>
  </component>

Example 2:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           name="CalculatorComposite">
    <service name="CalculatorService">
        <interface.java interface="calculator.CalculatorService"/>
        <reference>CalculatorServiceComponent</reference>
    </service>
    <component name="CalculatorServiceComponent">
      <implementation.java class="calculator.CalculatorServiceImpl"/>
      <reference name="addService">AddServiceComponent</reference>
      ...
    </component>
    <component name="AddServiceComponent">
        <implementation.java class="calculator.AddServiceImpl"/>
    </component>
    ...
</composite>


Example 3:

(a)
<reference name="stockQuoteService"
target="StockQuoteMediatorComponent"/>

(b)
    <reference name="HelloWorldService"> 
      <interface.java interface="helloworld.HelloWorldService"
         callbackInterface="helloworld.HelloWorldCallback"/>
<interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" interface="http://helloworld#wsdl.interface(HelloWorld)" 
callbackInterface="http://helloworld#wsdl.interface(HelloWorldCallback)"
      wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
      <binding.ws endpoint=
"http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)" location="wsdl/helloworld.wsdl" />
    </reference>

Example 4: (a) Intent declaration; (b) Profile declaration.

(a)
<intent name="confidentiality" constrains="sca:binding">
<description>
Communication through this binding must prevent
unauthorized users from reading the messages.
</description>
</intent>

(b)
<sca:profile intents="sec.confidentiality rel.reliability"/>

Example 5:

<policySet name="SecureMessagingPolicies"
provides="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="confidentiality"
default="transport">
<qualifier name="transport">
<wsp:PolicyAttachment>
   <wsp:AppliesTo>
    <wsa:EndpointReference xmlns:myStore="..." >
 <wsa:Address>http://myStore.example.com/acct
</wsa:Address>
 <wsa:PortType>
myStore:myPortType
</wsa:PortType>
 <wsa:ServiceName>
myStore:InventoryService
</wsa:ServiceName>
    </wsa:EndpointReference>
  </wsp:AppliesTo>
  <wsp:PolicyReference
URI="http://myStore.example.com/policies.xml" />
</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>

Example 6:

<sca:service name="mySpecialService">
<sca:interface.wsdl portType="..." />
<sca:profile intents="sec.authentication rel.reliabilty"/> 
</sca:service>


1


