Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


Send, Receive & Change
Using WorkSpace's RAD features to implement XML Transformations and Messaging

Pick up any book or article on Service Oriented Architecture (SOA) and somewhere in the text will be the statement that SOA isn't about throwing away existing systems and redeveloping them, but integrating them into new SOA processes, SOA processes that are flexible enough to change through characteristics that are loosely coupled, course-grained, standards-based, business-oriented and patterns-based, as described by my colleague David Brandow in PBDJ October 2006.

These existing systems in your enterprise or at your collaborative partners need to exchange data either by sending or receiving, or both, and this data may not be in the form that you want. So what two areas are key parts in this? First, the standard way of passing data XML (Extensible Markup Language) and second the standards-based ESB (Enterprise Service Bus) such as TIBCO or JMS etc. So what we are going to investigate is how Sybase WorkSpace can help you in developing Transformation and Messaging Services.

Transformation Services
Since most data is sent between business processes as XML we all need to be expert in parsing and creating XML documents to get data elements in and out of our systems. To most of us, except the XML guru, this could be daunting, but Sybase WorkSpace's RAD features make this pretty simple. In fact in certain areas that my articles have shown already, WorkSpace makes it transparent.

For example my orchestration of services into a bigger business process (see Figure 1) internally uses SOAP messages that contain XML documents to send data from one service on to another and we give you all the RAD features in WorkSpace to abstract that complexity out of the equation so you can concentrate on the business problem.

Transformation Services come into play when interacting with other systems or a service where you have to manipulate XML documents, enrich them with other data, and either merge or split them. Transformation Services can also take messages that aren't XML-based - custom wire formats - and transform their message definitions that can also be created in WorkSpace.

From within WorkSpace select the File|New|Service option to create a new Transformation Service (see Figure 2). The wizard will let us assign an XML schema for the source data. This is probably something supplied by your collaborative partner. Click on Add Schema button next to Source schemas area. (See Figure 3.)

Here we can also assign a target XML schema that the input XML data would be transformed to. The newly created transformation service is opened in an editor and when the Map Tab is selected this is where we can graphically define the mapping from input elements to the output elements of the corresponding XSDs. To do the mapping, click on each element in the source box (left) and drag the mouse over the element in the target box (right) - (see Figure 4). Under the Transformation Rule panel below the map grid is where extra XPath expressions can be built graphically. We have now completed the creation and definition of the transformation mapping for this service. The finished service map looks like this:

WorkSpace has taken care of the generation of the code to transform the data efficiently. We can test the Transformation Service without deploying it to our service container by clicking on the Test tab, (see Figure 5) supplying the existing XML file, and clicking on the Test button. The mapping will be applied and the output will be displayed in the test result. Once tested, the Transformation Service can be deployed.

Subscribing to a Message
First let's look at how to create a service that will listen to a service endpoint, such as a JMS Queue, so it can receive messages from another system or partner. That may sound really complex but the way WorkSpace is architected it's pretty simple. For this example we'll look at an existing service that takes a complex input datatype. This complex type will be the XML schema of the message that we expect to receive.

Everything we need to do for this service to listen for a message is defined in the Sybase Service Page Profile. If we open the Service Package Profile and switch to the Access Configuration tab and highlight HttpTransport we can click on the Remove button (see Figure 6).

We can now set up access to this service using a JMS endpoint. Doing this would result in the service subscribing to a selected message endpoint for incoming requests. Click on the Expose Service button (see Figure 7).

Click the New button on the Select Transport dialog and select JMS Messaging as the transport type (see Figure 8) and click Next. Select Reference from Enterprise Explorer and click on the Browse button. Connect to your EAServer (MyAppServer) and select an existing JSM Queue as the message endpoint from the Message Transports (see Figure 9). In the WorkSpace Navigator, highlight the package, right click and choose Deploy Package to deploy the service to your MyServiceContainer connection profile, which is UO (UnWired Orchestrator).

Note that the Test Service option on the service in Enterprise Explorer is only for HTTP-based services. To test a service exposed over a messaging endpoint, you'll have to create a message service that sends the input message to the same endpoint. We'll do that next.

Publishing a Message
You'll probably need to publish your message to an endpoint, such as a JMS Queue, so it can be sent off to another system or partner. Again that may sound really complex but this is the realm of the Message Service.

From within WorkSpace select the File|New|Service option to create a new Message Service. Select the endpoint page of the wizard and click on Next again on the endpoint name page. Select JMS on the messaging type page and click Next. Select Reference from Enterprise Explorer and click on the Browse button. Connect to MyAppServer and select an existing JMS Queue as the message endpoint (see Figure 10) and click Finish. Select the Service Interface Tab. By default a send operation has been added. Open the Operation Parameters panel. This operation has already parameter data of the String type but can be changed to a complex datatype for an XML message.

Now, create a deployment package by right-clicking on the service file and deploy the service to MyServiceContainer.

In the Enterprise Explorer view, expand the MyServiceContainer profile and locate the service. Right-click on the service and select the Test Service option. On this page, you will input the required values. Click the Edit button and click on Edit when the dialog is displayed (see Figure 11)

Click the Add button. Move the mouse to the row and click on the button to enter values for a row.

A dialog is provided to enter values for each element in the row. Add as many rows as desired. Click the OK buttons to go back to the Parameters for method page, and click the Invoke Button. A message indicating send operation executed successfully is displayed at the bottom of the page. Click Finish to exit from the Test dialog. You just created a message service that sends a message to a JMS endpoint.

Conclusion
Now that you've seen how easy it is to manipulate and exchange data with services created in Sybase WorkSpace, DON'T THROW IT AWAY - REUSE and think SOA!

About Ian Thain
As one of the Sybase Technical Evangelists, Ian regularly addresses technical audiences all over the world and his sessions are always very well attended. He also writes education classes, whitepapers, demos and articles for various Sybase products and publishes regularly in Journals such as SYS-CON's PBDJ and International Developer Magazine. He is also the Sybase Unwired Platform & PocketBuilder Evangelist and works closely with the team in Dublin, CA and Concord, MA on new features and demonstrations for the products. He is also Tech Chair of iPhone Development Summit 2009 - New York (June) and San Francisco (November). In his customer-facing Evangelist role, Ian is very involved with the design, production and testing of Enterprise class Unwired Solutions, that have been implemented using Sybase's Unwired tools for Sybase customers around the globe. In addition, Ian is a dedicated technical expert continually working with Sybase's key partners and clients to enhance the capabilities of the Unwired solutions that Sybase can offer to its customers. Ian can also be found on Twitter @ithain

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Enterprise Open Source Magazine Latest Stories . . .
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
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