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 Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

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
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
J2EE Release 1.4
J2EE Release 1.4

The Web service-based functionality provided in Sun Microsystems J2EE 1.4 is a culmination of the Java APIs and utilities that were previously part of the Java Web Services Developer Pack (WSDP) and have been repackaged for the most part into J2EE 1.4. For the sake of this review, I will cover only the new Web services-related features included in the new release. With that said, let's explore what J2EE 1.4 has to offer regarding developing and implementing Web services.

First, there are plenty of Java-based development platforms out there that enable you to expose J2EE applications as Web services, so the technology is not really all that new. For instance, the concept of using servlets to consume and process Web service requests and relying on EJB components to handle the business logic and persistent data storage is proven technology. What is exciting is that this technology is now officially part of the J2EE standard, and will enable interoperability of Web service functionality across various vendor platforms. What this promises for developers is that instead of using proprietary APIs that come with a particular Java application server, you will be using standard J2EE APIs. So, just as JSPs and EJBs are standardized, you will be seeing the same for Web service-specific APIs.

In addition to adding Web services functionality, J2EE 1.4 comes packaged with some of the more popular Java-based open-source software products, including Jakarta Ant and the Cloudscape relational database. Install and configure Apache Tomcat, which also comes with the release, and you have the makings of a basic, roll your own, Web service development platform. You get some really nice features, and you can't beat the price. You need to remember though that large-scale production environments will still require the use of industry-proven application servers such as WebLogic or WebSphere. What's important here is the standardization or J2EE branding of the Web service Java APIs.

The APIs
OK, at this point you may be asking, what are these APIs? Let's go over some of them. First, what I call the "JAX in a box" APIs is JAXP. To those familiar with Java-based XML parsing (SAX and DOM) and XSLT processing facilities, these are really our old friends Xerces and Xalan (or is that Xalan and Xerces, I can never get them straight). Both of these started in the open-source arena and now join the J2EE family, which they rightfully should. It is difficult to name any Java-based XML or Web services product in the market that doesn't include some aspect of their functionality and libraries.

Next on the list to join J2EE is JAXR. This API provides you with the ability to look up Web services and other XML-based documents on ebXML and UDDI-based XML registries. JAXR also provides rich query capabilities as well as rich metadata capabilities for classification and association. It gives programmers the capability to write abstract registry client programs that are portable across different target registries

Next in the JAX lineup is JAX-RPC. This API covers all aspects of implementing RPC-type SOAP messages, and for the J2EE 1.4 release includes support for SSL-based authentication, serializers and deserializers for collection types, and other improvements. You would use the JAX-APIs when developing your Web service endpoints. It's basically the servlet-based stuff that maps SOAP parameter types from XML to Java data types, and manages the actually method calls that implement the service.

In a break from the JAX-based naming convention, we will next cover SAAJ, or SOAP with Attachments API for Java. Here we're talking about a number of APIs to cover document-based SOAP service calls that involve the processing of a SOAP message through asynchronous message queues. The technologies include DOM4J, Jakarta Common Logging, JAXP, JavaMail, and JavaBeans Activation Framework.

In addition to the APIs, J2EE 1.4 includes a number of utilities for developing and deploying Web services. These include J2EEC, which helps you to generate stubs, ties, and so on for JAX-RPC-based services and WSCOMPILE, which also helps you to generate stubs, ties, and WSDL files for JAX-RPC services.

Using J2EE 1.4
Now that we have gone over what the J2EE 1.4 release contains, how would you use it? Here's an example of how all the parts come together using the APIs provided in J2EE 1.4.

Figure 1 shows a synchronous Web service using the JAX-RPC APIs. The Web service endpoint is managed by a JAX-RPC-based servlet that accesses persistent storage (a database) directly or, in the case of calling an EJB component, indirectly. In the case where you are building off of an existing J2EE application, the SOAP endpoint is considered by the system to be just another view or presentation of the application.

 

Figure 2 shows another example of using the J2EE Web service APIs, this time implementing an asynchronous, message-based service. Clients of asynchronous Web services do not need to wait around for a response from the service. Instead, the response will come some time later in the form of a direct SOAP call to the client (the client has a service also), or by the client polling on a regular basis for the response to arrive. In this diagram, you will notice that the application is using JMS (Java Messaging Service) to deliver the SOAP XML document tied to message-driven enterprise JavaBeans (MDB).

 

There are a number of excellent white papers available at the java.sun.com site to help you learn how to the use these APIs and how to implement various Web services using the J2EE architecture. "Using Web Services Effectively" not only describes the purpose for each Web service-based API described here, but also provides information on using J2EE patterns and other informative tips, such as how to directly expose an EJB component as a Web service endpoint.

In addition to documentation, you can download a sample application involving a Pet Store order management system. This provides an excellent start for anyone interested in developing Web services using the framework.

The J2EE Release 1.4 installation file and associated documentation can be downloaded from the Web site at http://java.sun.com/j2ee/download.html. While you're at it, you'll also need to download and install the 1.4 version of the Java 2 SDK before installing J2EE. You will need to become a registered member of the Java Developer Connection, which is not that difficult (you can sign up and get started right away).

At the time of this writing, I was looking at a beta version that was open to everyone in the Java developer community.

Conclusion
Compared to other Java-based Web service development products on the market today, developing SOAP services with J2EE 1.4 requires a lot more hands-on work, and heaven forbid, you may need to actually read the XML. But for those projects that require highly customized SOAP-based Web services, especially on top of existing J2EE frameworks, the ability to work at the API level can't be beat. J2EE 1.4 also provides an excellent start for those interested in understanding Web service and XML processing basics.

About Joe Mitchko
Joe Mitchko is the editor-in-chief of WLDJ and a senior technical specialist for a leading consulting services company.

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

Register | Sign-in

Reader Feedback: Page 1 of 1

SOA World Latest Stories
In a surprise move on Tuesday, January 10, Oracle wheeled out its Big Data Appliance. That’s the one it said in October would be ready sometime in the first half. Only nobody believed it meant early in the first half. Heck, it’s not even clear anybody thought Oracle could make the fi...
A Munich court Thursday found Motorola Mobility guilty of infringing an Apple patent and handed Apple a permanent injunction against two Android smartphones. Apple can enforce the injunction after posting a bond lest MMI succeed in invalidating the slide-to-unlock patent (EP1964022) ...
Quick Response (QR) codes are intended to help direct users quickly and easily to information about products and services, but they are also starting to be used for social engineering exploits. This article looks at the emergence of QR scan scams and the rising concern for users today....
The Chinese company that claims it owns the iPad trademark says it plans to seek a ban on iPad exports out of China, threatening global supplies. According to what a lawyer for Proview Technology (Shenzhen) Co Ltd told Reuters, the firm is petitioning Chinese customs to stop shipment...
Cisco Wednesday filed suit in the European Union’s second-highest court, the General Court in Luxembourg, challenging the European Commission’s rubber stamp last October of Microsoft’s $8.5 billion acquisition of Skype. Cisco says it isn’t opposed to the merger, but figures the EC sh...
2011 was a year of rapid adoption for public and private cloud services. Instant and on-demand server provisioning was the driving force behind the massive growth. On top, cloud server templates and script automation simplified application installation for simple and pre-defined applic...
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