member login

WebServices dot org

Todays Featured Content:

Web App Development for the SOA Age

Are you fed up with brittle, expensive, and support intensive Rich Internet Applications? This paper demonstrates the solution and the future.

12 UK Council Deployments of Front and Back Office Integration Adapters Using Lagan and Hyfinity Technology Within Weeks

Hyfinity is pleased to announce that 6 UK Local Authorities have deployed Lagan web-based Integration Adaptors linking their Lagan CRM and Case Management system to Northgate’s Sx3 Revenues and Benefits back office applications.

Automating Rich Internet Application Development for Enterprise Web 2.0 and SOA

Modern Rich Internet Applications for SOA have to cope with very complex, multi-layered peer-to-peer architectures and ever-increasing technologies, ranging from XHTML, AJAX, Java, XML, HTTP SOAP and all the transformations in-between different layers of the architecture

ZapThink on Hyfinity: Enabling Rich, Composite Web Applications

Web application development is becoming increasingly complex, time consuming, and brittle. For many organizations, the addition of Rich Internet Application (RIA) technologies like Ajax look promising, but...

Featured Content provided by Hyfinity

Doing the Tango Java Style

5th Jun 06:

Roundup of the main Web services announcements from JavaOne 2006, including project Tango, now officially known as Web Services Interoperability Technology.

JavaOne is “the” Java event of the year, and this year attracted no less than 10,000 java developers. It is enormous and keeping track of all the announcements, the gossip, the roadmaps, the new technologies is no easy task even if you attend. Even harder if you, like myself, didn’t.

Each year, not attending JavaOne pains on the conscious. The knowledge that pretty much everything in Java was presented, demo’ed and debated makes you feel lacking for yet another year. Luckily it no longer needs to be like this. Plenty of material (articles, weblogs, webinars) exists these days to allow a virtual JavaOne experience. So, in this weblog I offer up my virtual experience of what happened.

Web services is the main interest in this article. However, if you are after an overall summary of everything at JavaOne look no further than this comprehensive day by day summary , the quick overview and the executive summary .

So, quickly, what were the main announcements apart from Web services? Open sourcing Java (" It's not a matter of Whether, but a matter of How "), Java EE 5 being “done” (see press release ), and lots and lots about AJAX .

Back to Web services. Below is a brief summary to the major announcements. Apart from Java EE 5, all other technologies from Sun discussed below are open source, an approach that Sun have made a strategic vision it would seem, “ Sun Advances Open Source Strategy at JavaOne ”. However, I do say “open source” with a pinch of salt. Open source for Sun means the CDDL , a licence that a number of open source proponents have genuine issues with.

Java EE 5 and Web services

Java EE is now in version 5 (Sun changed the numbering system after java 1.4) and the good news is this brings really significant improvements for Web services development. The two main advantages of Java EE 5 go hand in hand, they are annotations and much better and simpler EJB support for Plain Old Java Objects (POJO).

The annotations are the real improvement and they bring a real step towards “ease of use”. Instead of writing the oddles of supporting code and interfaces to make a POJO a Web service, now…all you do is annotate. You write “@WebService”. Couldn’t be easier and while this style of annotation has been available in .Net from the start, it is great to see it now coming through into Java. The “@WebService” annotation is one of a handful of Web-service annotations defined in the Web Services Metadata for the Java Platform specification ( JSR 181 ). You can read more about annotations for Web services here .

To give you an example, say you were required to write a stateless session bean that could operate as a Web service. With annotations, it is as simple as follows:

The reduction in developer time writing boilerplate code is significant, meaning much more time to spend doing the application, not the wiring. Of course annotations exist for much more than simple Web services. Writing EJBs, making them persist, doing transactions.. are all much easier now also.

The example above is lifted from the technical keynote slides which give an excellent overview of what Java EE annotations mean for Web services development, and Java coding in general.

Sun have been working on project " Tango " for sometime and it has now matured into WSIT (whiz-it), Web Services Interoperability Technology. WSIT is the culmination of ongoing web services interoperability efforts between Sun and Microsoft (who attended JavaOne). As Sun puts it “ Sun Java Web Services (JWS) engineers are working with Microsoft Windows Communication Foundation (WCF) engineers to ensure interoperability of enterprise features. such as security, reliable messaging and atomic transactions.”

This diagram lifted from this Tango introduction article here illustrates the project objectives:

 

The first components for WSIT have been released at JavaOne and Sun will continue to release further additions as part of the GlassFish project (an open source application server based on Java EE 5). The news is an important step since Sun need to quickly demonstrate support for many of the WS-* standards. They acknowledge this fact an appropriate press release . Of course support for WS-* in Microsoft’s .Net Web Services Enhancements ( WSE 3.0 ) has been available since late 2005, and includes WS-Trust, WS-Security, and WS-Reliable Messaging stacks. Soon however, both .Net and J2EE will have wide support for WS-* and then we'll have an excellent reason for building enterprise Web services around SOAP.

WSIT is still very much work in progress but is built on two main components that are available today, JAX-WS (for good reason JAX-RPC 2.0 has been renamed to JAX-WS 2.0 ) and JAXB 2.0 . JAX-WS is much improved version of its predecessor, JAX-RPC and importantly, is not “RPC” centric but doc/lit centric. JAX-WS builds on annotations, generics and other java 5 features, plus links in with JAXB 2.0 schema support, improved asych messaging support and alternative transports to HTTP and even have some REST support.

In this case, the REST support provoked a range of reactions. Some people is arguing that “Java had the technology for it for many years: Servlets and JSPs”. The product, according to them, “tries to solve the WS-* problem and then says ‘we forgot about that REST thing’ and tries to backpatch a hack”. The obvious lack of REST support is true, and in fact this post shows clearly the ardous task it is to create a simple REST service. For REST supporters, the fact REST is harder to code than Web services is very unfortunate and will doubtless mean they'll stay away from JAX-WS as the ease of use and consumption are among the main features for using RESTful Web services. One thing that can be viewed as low importance when REST is compared to SOAP is the automatic WSDL generation. In this case, instead of generating an HTTP GET binding, as defined in WSDL 1.1 , there is no support at all. In any event, REST has its place and so it's nice to see that JAX-WS authors recognized it. Unfortunately, upon closer examination, it turned out that REST support in JAX-WS is pretty shallow.

JAXB defines a much improved bi-directional XML/Object relational data binding model for Web Services. JAXB 1.0 specified the mapping of XML Schema-to-Java, but not the mapping of Java-to-XML Schema. JAXB 2.0 completes this gap by specifying the mapping from Java-to-XML Schema. JAXB has support for annotations and also at last, 100% XML Schema. However, as with all OO/XML mapping technologies you really need to understand the pitfalls. For a really good overview of issues in mapping objects to XML you can read a transcript of a great interview with Ted Neward on the two perils of Web services; incompatible data type platforms and the object XML mismatch.

So what WS-* support is available today? WSIT has its own homepage at java.sun.com , but to get a handle on where the code is as for QoS WS-* standards etc, you need to visit the development source code page at java.net find this from the “ status ” page of the early access releases. What you find is that interoperability testing is still being done, with some passes, some fails. One standard that seems to have good passes on all tests and is assumedly ready for use is WS-Addressing. The Java WS-Addressing implementation is aptly named JAX-WSA .

Arun Gupta is the lead engineer from Sun working on WSIT, and his slides for his WSIT session are available here . There is also a video of a demo here . The slides give a number of pointers to the type to interoperability work Microsoft and Sun are doing and principles they are adhering to, such as “avoid schemas constructs that do not map well to programming languages” and “use schemas as a data type description, not a validation mechanism” (Did Arun see the potential for denial of service attacks with large messages being parsed and no validation?). There slides also describe a new meaning to the well know acronym KISS (commonly understood as Keep It Simple Stupid). Their variation was “KISS: Keep Interoperable Schemas Simple”. I guess if only life was that simple, since many a standards organization and consultancy make a living of doing the opposite.

I can only hope Sun continue bring all the Web services work on Java together in one place, making it easy for budding Java Web services developers to easily pinpoint what technologies are available for download. Historically that place been the Java Web Services Developer Pack , currently in version 2. It has all you need for Web services development and assuming you are set up with Java EE 5, you are ready to start coding.

Picture from JavaOne’s exhibition area showing the WSIT in action.

Last year Sun unveiled its Java Enterprise Service Bus project. Called Open ESB , it is an implementation of JSR 201 , commonly know as JBI. The main page for Open ESB on java.sun.com can be found here . The announcement from JavaOne is that Sun have released a “SOA Starter Kit” which includes the Open Java ESB beta and the Java CAPS BPEL Engine (Sun Java Composite Application Platform Suite (CAPS) features technology acquired when Sun bought SeeBeyond last year).

 

Service Component Architecture at JavaOne

No JavaOne conference would be complete without Service Component Architecture (SCA), the new spec on the ESB block. Let us remind ourselves what SCA is. Jon Mountjoy, BEAs Dev2Dev manager, attended the SCA JavaOne session and makes a good summary in saying “SCA allows you to take components written in heterogeneous languages, wrap them into "service assemblies" that essentially adds hierarchical binding facilities (SOAP/WSDL/JMS/whatever you want) and composition facilities (this service needs that service to operate) and service-level features (security, reliability, etc.).”

Jon concludes by saying, “I came away thinking that SCA is a lot simpler than I initially thought, and a lot more important. I need to get a good article up on this subject.”. I’ll second that since after reading the spec …I feel I could do with reading a good article.

SCA is being implemented as part of Apache’s project Tuscany . More clues about what SCA is can be found in the introduction, “The Apache Tuscany project simplifies the development of business solutions that use a service-oriented architecture. It allows new solutions to be constructed by combining new or existing services within an easy to configure service oriented run time with little or no programming. It does this by providing implementations for the Service Component Architecture (SCA) and Service Data Object (SDO) and providing Data Access Service that supports SDO. Tuscany integrates with well established Web Services and server technologies such as Apache Axis2, Apache Tomcat and Geronimo.” Pity there are no code releases yet.

 

Oracle and SOA 2.0

Oracle and Gartner both championed the term SOA 2.0 at JavaOne, jumping on the success of Web 2.0. So what does it mean? Well SOA 2.0 was first used back in 2005 by Richard Veryard when he first put forward his idea as “SOA 1.0 represents a limiting (and to my mind relatively uninteresting) way of using SOA [think IT Internals], while SOA 2.0 represents a bigger vision of what SOA makes possible. [think business transformation]”.

Richard tries to define SOA 2.0 by comparing it with SOA 1.0 (if it ever existed). He says SOA 2.0 apparently gives an “improved customer experience”, where SOA 1.0 gave “better cost savings”. You had better ask Richard for an explanation of what that means.

For one person to use the SOA 2.0 jargon is amusing, but for two leading companies is simply stupid. I can only offer my condolences to their marketing teams who doubtless had to backup the idea. Oracle and Gartner believe SOA 2.0 is about merging Event Driven Architecture and SOA. Even if there was such a merger possible, call it EDA SOA, but not SOA 2.0.

Mark Little sums it up wonderfully in his webservices.org weblog ,

"

I also expected more of Oracle on this one! Giving an architectural approach a version number is crazy: it makes no sense at all! Only in software would we even consider such a thing. Can you imagine going back in pre-history: is a hut also to be known as Cave 2.0? Would a house be Cave 3.0 or Hut 2.0? Where would the St Paul's Basilica come in the grand scheme of things?! If something is truly an architectural advance over its predecessors, then it should be named uniquely for a start. Caves, huts, houses, high-rise buildings all share some commonality, but they have different architectural approaches too. To call the Empire State Building an upgraded cave is to do it an injustice (at the very least)!”

"

 

Putting it all together

The general sessions from the conference are available for download. One in particular is worth viewing here since it puts together most of the new technologies into one solid demo and presentation. Bill Shannon and collegues demo how easy it is to build, deploy, and test a web service and with the help of NetBeans 5.5 and VI (the age old editor), create a client for the web service, deploy it, test it, and to get the point across, using annotations make it a transactional Web Service implemented as an Enterprise JavaBeans (EJB) 3.0 stateless session bean. Well worth a look.


Trackback URL for this post: http://www.webservices.org/trackback/id/74935

Comments