YOUR FEEDBACK
John Portnov wrote: This code does not work for me. I created a new website and a C# console applic...
AJAXWorld RIA Conference
$300 Savings Expire August 22
Register Today and SAVE!


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TODAY'S TOP SOA & WEBSERVICES LINKS


Building SOA with Tuscany SCA
A simple service-oriented infrastructure

Based solely on this information Tuscany SCA makes three things available automatically;

•  The Catalog JSONRPC service
•  The JSONRPC service description (SMD)
•  A generated JavaScript JSONRPC proxy for accessing this service

A browser-based application can access this service directly using either the generated JSONRPC proxy or whatever JSONRPC client the application developer is familiar with, for example, the store sample uses the following JavaScript to access the Catalog service:

catalog = (new JSONRpcClient("../Catalog")).Catalog;
catalog.get(catalog_getResponse);

Clearly this pattern can be extended to any service your Web 2.0 style application is required to communicate with. The full range of SCA features is then available to these services. For example, our Catalog service could easily be exposed as a Web service (binding.ws) by extending the SCA configuration description of the service.

...
<service name="Catalog">
    <t:binding.jsonrpc/>
    <binding.ws/>
</service>
...

Note that no changes to the Catalog component code are required. The Tuscany SCA runtime is doing all the hard work.

SCA has provided services to the Web 2.0 application with very little effort on behalf of the developer. What effort is expended is not particular to supporting Web 2.0 applications as the services are now part of the wider enterprise service orientation approach.

Tuscany SCA supports other modes of operation that will be of interest to Web 2.0 application developers. For example, the Tuscany Java SCA Chat sample [9] uses binding.dwr to implement a Direct Web Remoting [10] connection between a JavaScript browser-based application and an SCA service. Using this binding, service-to-browser communication is supported alongside browser to service communication (see Figure 3).

Data Integration
In a typical enterprise, business data comes from many different sources and is presented in many different formats. Tuscany SCA provides a databinding framework that seamlessly handles data format mapping and therefore frees the developers from such concerns.

Let's look at a simple scenario that deals with aggregation of XML data from different sources. This demo will be available in a future release of Tuscany. The business function here calculates the total value of all the accounts (checking, savings and stock) that a customer owns (see Figure 4).

In this scenario, data is received from various data sources and manipulated as XML. The following data exchanges are occurring.

  1. Use an RSS feed to retrieve currency exchange rates from the Web.
  2. Load the account data for a customer from an XML file or database.
  3. Invoke a live Web service to get quotes for a list of symbols.
  4. Calculate the total value by joining the XML data from 2 and 3.
The handling of different data formats in the enterprise can be complex. For example, business data may be represented in many different ways, even if they are for the same infoset. A Customer business object can be defined as JavaBean, SDO, JAXB, XMLBeans, or DOM. At the same time, protocol implementation stacks require different data representations. For example, in the Web service domain, Axis1 uses DOM, Axis2 uses AXIOM, and JAX-WS uses JAXB. Implementation technologies may also impose requirements on the data as well; for example, the Apache ODE BPEL engine consumes/produces data using DOM and the SAXON XQuery engine consumes/produces data using NodeInfo.

Application developers should have the freedom to choose their preferred data representation without being restricted by the above concerns and worrying about the mappings. Tuscany SCA automatically handles this for them. Tuscany provides the most popular databindings including SDO, JAXB, XMLBeans, AXIOM, JSON, DOM, SAX, and StAX. There are more than 50 transformers to convert data between the databindings. With the transformer graph, Tuscany SCA supports point-to-point transformations as well as multiple-hop transformations. This approach greatly reduces the number of transformers required and makes it possible to transform data without direct transformation logic.

In the sample, the exchange rate is retrieved (step 1) using the feed binding (binding.rss) as follows.

<reference name="exchangeRate">
   <tuscany:binding.rss
uri="http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S" />
   </reference>

Step 3 uses the Web service binding (binding.ws) to retrieve stock from the Internet.

<reference name="StockQuoteReference" promote="AccountService/stockQuote">
    <binding.ws wsdlElement="http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)" />
</reference>

The Java interface is interesting. The example uses StAX to streamline XML data exchange over Web services. The Tuscany SCA databinding framework allows component developers to choose their preferred XML Java databinding technology such as JAXB, SDO, DOM, or StAX no matter how the SOAP message is represented in the Web services stack (AXIOM is used by Axis2).

@Remotable
public interface StockQuote {
    public XMLStreamReader GetStockQuotes(XMLStreamReader input);
}

The various XML data are joined together using XQuery (implementation.xquery) in step 4. With the help of the databinding framework, XQuery mediates data from many services. The capability of XQuery can be extended by invoking other SCA components.

@Remotable
public interface StockValue {
    double calculate(XMLStreamReader quotes, XMLStreamReader accounts);
}


About Haleh Mahbod
Haleh Mahbod is a program director with IBM, managing the team contributing to the Apache Tuscany as well as SOA for PHP open source. She has extensive development experience with database technologies and integration servers.

About Raymond Feng
Raymond Feng is a senior software engineer with IBM. He is now working on the Service Component Architecture (SCA) runtime implementation in Apache Tuscany project as a committer. Raymond has been developing SOA for more than 4 years and he was a key developer and team lead for WebSphere Process Server products since 2002.

About Simon Laws
Simon Laws is a member of the IBM Open Source SOA project team working with the open source Apache and PHP communities to build Java, C++, and PHP implementations of the Service Component Architecture (SCA) and Service Data Object (SDO) specifications. Prior to this role he was working in the distributed computing space building service-oriented solutions for customers with a particular interest in grid computing and virtualization.

YOUR FEEDBACK
XML Developer's Journal News Desk wrote: DocSoft says its new enterprise search technology, called 'Element' unleashes the power of structured data within a company's repository. With Element as a plug-n-play addition to a company's network, users will be able to search for stored data across the network 'smarter,' thus more efficiently, the company says. Element indexes XML-originated documents according to each tag or 'element,' which provides what the company calls 'context searching.' Element can even search metadata embedded into virtually any file format using Adobe's eXtensible Metadata Platform (XMP).
XML JOURNAL LATEST STORIES . . .
ISO said Friday that the appeals made by Brazil, India, South Africa and Venezuela protesting the standardization of Microsoft’s Office Open XML (OOXML) file format hadn’t gone anywhere – it was unclear whether any of them had any standing anyway – but since they “failed to g...
Red Hat CTO Brian Stevens, Citrix CTO Simon Crosby, Egenera CTO Pete Manca, Allen Stewart, Group Manager, Windows Virtualization at Microsoft, and Brian Duckering, Sr. Director of Products and Alliances at Symantec were the top industry executives who joined Jeremy Geelan in the 4th Fl...
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted to be...
Since its inception, XML has been criticized for the overhead it introduces into the enterprise infrastructure. Business data encoded in XML takes five to 10 times more bandwidth to transmit in the network and proportionally more disk space to store.
Vordel unveiled version 5.1 of its XML network infrastructure products, to accelerate, manage and protect XML applications. Vordel 5.1 addresses the need for lifecycle management of policy across the SOA. By combining the central management of SOA policies with distributed enforcement ...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS


ADS BY GOOGLE
BREAKING XML NEWS
Avineon, Inc. (http://www.avineon.com), a successful provider of IT, geospatial, engineering and pro...