...
Once we have all the business logic implemented, we can then decorate the references and services with proper bindings so that they can collabrate over the networks.
Code Block |
---|
SCDL showing OrderProcessing talking to Invetory and Shipping over binding.ws
|
This XML SCA configuration language allows you to describe you loosly coupled enterprise component integration in the same way you use Pring to configure components inside you applications.
With this in place we can;
Expose our existing enterprise application as a service using a variety of binding technologies
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
targetNamespace="http://bigbank" xmlns:bb="http://bigbank" name="BigBank">
<component name="AccountServiceComponent">
<implementation.java class="bigbank.account.AccountServiceImpl" />
<service name="AccountService">
<tuscany:binding.jsonrpc uri="/AccountJSONService" />
<binding.ws wsdlElement="http://bigbank#wsdl.port(AccountService/AccountServiceSoap)" />
<binding.sca />
</service>
<reference name="accountDataService" target="AccountDataServiceComponent" />
<reference name="calculatorService">
<tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService" />
</reference>
<reference name="stockQuoteService">
<binding.ws uri="http://localhost:8081/services/StockQuoteWebService" />
</reference>
<property name="currency">EURO</property>
</component>
<component name="AccountFeedComponent">
<implementation.java class="bigbank.account.feed.AccountFeedImpl" />
<service name="Collection">
<tuscany:binding.rss uri="/rss" />
<tuscany:binding.atom uri="/atom" />
</service>
<reference name="accountService" target="AccountServiceComponent" />
</component>
<component name="AccountDataServiceComponent">
<implementation.composite name="bb:AccountData" />
</component>
<component name="WebResourceComponent">
<tuscany:implementation.resource location="web" />
<service name="Resource">
<tuscany:binding.http uri="/" />
</service>
</component>
</composite>
|
Code Block |
---|
<reference name="stockQuoteService">
<binding.ws uri="http://localhost:8081/services/StockQuoteWebService" />
</reference>
|
This XML SCA configuration language allows you to describe you loosly coupled enterprise component integration in the same way you use Pring to configure components inside you applications.
With this in place we can;
Expose our existing enterprise application as a service using a variety of binding technologies
Code Block |
---|
<service name="CalculatorService">
<tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/>
</service>
|
Code Block |
---|
<component name="StockQuoteServiceComponent">
<implementation.java class="stockquote.StockQuoteImpl" />
<service name="StockQuoteService">
<binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/>
</service>
</component> |
Code Block |
SCDL showing and extra binding.rmi added
|
Access enterprise services using a variety of binding technologies
...