Articles
Java Platform, Standard Edition
|
|
| By Ed Ort, April 2005 |
|
Introduction | Terms and Concepts | Web Services Protocols and Technologies | Java Technologies for Web Services
In addition to toolkits such as the J2EE 1.4 SDK and Java WSDP 1.5, a number of Java technology-based development tools and servers incorporate implementations of Java technologies for web services. These tools can simplify the process of developing and deploying web services and applications that use web services. This section highlights a number of these tools and servers, and the web services technology features they offer.
NetBeans IDE 4.1, which is currently available as a Beta release, is a comprehensive tool for developing enterprise Java applications and web services. Using NetBeans IDE 4.1, you can develop J2EE 1.4 applications, application components (such as Enterprise JavaBeans components), and web services, and deploy them to Sun Java System Application Server 8.1 Platform Edition. From a web services perspective, you can use the tool to generate client code so that an application can use existing web services. You can also use the tool to create and test web services. In creating a web service with the NetBeans 4.1 IDE, you can implement the web service endpoint as a web application or a session bean.
NetBeans IDE 4.1 offers a graphical environment for application and web service development. It also provides an extensible framework that integrates tools for development. NetBeans IDE 4.1 simplifies application and web services development by freeing you from doing a lot of the detailed coding needed to use J2EE application technologies and web services technologies. It allows you to focus on the logic of your applications and web services. It also frees you from having to manually invoke tools in the various steps of the development process. Instead you simply make selections in the NetBeans IDE user interface, and respond to prompts in the interface or in wizards. In response, the IDE generates the necessary code and invokes the needed tools. NetBeans IDE 4.1 fully supports the J2EE 1.4 Platform (in fact, it's the first open source IDE to do so), including all the web services technologies in J2EE 1.4. This means that when you use the NetBeans IDE 4.1 to build web services and web service clients, the IDE generates the code for the underlying web services infrastructure, such as WSDL files, SOAP messages, and JAX-RPC artifacts.
For example, the NetBeans IDE 4.1 Quick Start Guide for Web Services shows the steps in creating, deploying, and registering a web service. The web service (named HiWS) is very simple -- it has one method, ( sayHi) that accepts a name of type String as its one parameter. In response, the service returns the string Hi followed by the name and an exclamation point, for instance Hi John! The Quick Start Guide also shows how to create a client for the web service and package it as an application. If you follow the instructions for developing the HiWS web service (implementing it as a session bean), here's what some of the windows in the IDE look like (the Project window and Source Editor window for the session bean class are shown):
|
Figure 6: NetBeans 4.1 Project and Editor Windows
|
Notice that the Source Editor window shown in the illustration displays the contents of the session bean class. NetBeans 4.1 automatically generates most of the code for the bean class as well as the service endpoint interface for the web service. In this example, all a developer needs to provide is the code for the method ( sayHi) in the bean class.
The next step in the instructions deploys the web service. In this step, NetBeans runs a script that, among others things, runs the wscompile tool, which generates a WSDL file for the web service and JAX-RPC artifacts such as a tie. After the web service is deployed, you can direct NetBeans 4.1 to use the WSDL file to generate client code (including client artifacts, such as a stub) for the web service.
Sun Java System Application Server 8.1 is a J2EE 1.4 platform-compatible server for developing and deploying J2EE applications and web services. Application Server 8.1 is available in three editions: Platform Edition, Standard Edition, and Enterprise Edition. The focus of the Platform Edition is developer productivity. This full-featured, high-performance, small-footprint container is free for development, deployment and redistribution. The Platform Edition is ideal for embedding and bundling and is already included in NetBeans 4.1, Sun Java Studio Creator, Sun Java Studio Enterprise, and Solaris. The current version of the Platform Edition, Sun Java System Application Server 8.1 Platform Edition 2005Q1, is available as a separate download, but is also available as a bundle with the J2EE SDK 2005Q1.
The Standard Edition and Enterprise Editions, build on the Platform Edition to support multi-tier, multi-machine, high-volume, mission-critical deployments. The current version of the Standard Edition, Sun Java System Application Server 8.1 Standard Edition 2005Q1, and the Enterprise Edition, Sun Java System Application Server 8.1 Enterprise Edition 2005Q1, are distributed as part of the Sun Java Enterprise System.
In addition to J2EE 1.4 platform compatibility, all editions of Application Server 8.1 integrate JavaServer Faces technology, the Java Server Pages Standard Tag Library, and the JAXP, JAX-RPC, JAXB, JAXR, SAAJ, and XWS Security components of Java WSDP 1.5.
The Sun Java Enterprise System integrates into a single package a comprehensive set of standards-based enterprise services. These services include web and application services, network and identity services, communication and collaboration services, portal services, and security services -- in short, the kind of services that provide the infrastructure for enterprise applications, including applications that use web services. Each of these services is provided by one or more components within the Java Enterprise System. Each component is also available as an individual product. The components for each service are listed here.
Solution-specific packages that bring together subsets of the Java Enterprise System are also available as Sun Java Suites. Each suite addresses a specific enterprise need, such as high availability, identity management, and application development and deployment. The suites are:
The contents of each suite are listed here.
The Java Enterprise System supports JAXP, JAX-RPC, JAXB, SAAJ, and JAXR. The Java Enterprise System components that implement web services technologies are:
The following table summarizes the web services technology support in the Java Enterprise System and its component servers:
|
Server
|
Web Services Technologies
|
|---|---|
|
Sun Java Enterprise System
|
JAXP, JAX-RPC, JAXB, JAXR, and SAAJ
|
|
Sun Java System Access Manager
|
JAXP, JAX-RPC, JAXB, JAXR, and SAAJ
|
|
Sun Java System Portal Server
|
JAXP, JAX-RPC, JAXB, JAXR, and SAAJ
|
|
Sun Java System Message Queue
|
SAAJ
|
In addition to the enterprise infrastructure services it offers, the Java Enterprise System also includes the Java Studio Enterprise and Java Studio Creator development tools.
Java Studio Enterprise brings together an integrated set of tools and enterprise services for developing, testing, and deploying enterprise Java applications and web services. The current release, Java Studio Enterprise 7, provides a graphical environment (including optimized wizards and property sheets) for building applications and web services that conform to J2EE 1.3 specifications. Upcoming releases of Java Studio Enterprise will phase in support for J2EE 1.4 web services technologies as well as some SOA-specific features (see The Future: Sun's SOA Initiative).
So far, the discussion of tools and servers has focused on building and deploying web services and the applications that use web services. But what about tools that assist in managing a service-oriented architecture, for example, tools that monitor service registration, control service versioning, or that secure services? In fact, tools that provide these features are on their way as an outgrowth of Sun's SOA Initiative. As part of this initiative, SOA-specific features will be phased into new releases of the Java Enterprise System, Java Studio Enterprise, and other Sun products. One of the features is a registry service that will be provided by the Java Enterprise System. This registry service is based on the freebXML Registry open source project. The registry service will implement the ebXML Registry Information Model (RIM) 3.0 and the ebXML Registry Services (RS) 3.0 specifications. The registry service allows businesses to register both services and metadata associated with those services (such as policy statements) in a registry/repository. Java Studio Enterprise will provide a JAXR provider, so that users will be able to access the registry/repository through the JAXR API.
Service and metadata registration is an important element in managing services in an SOA, but it's not the only important element. There are other elements that need to be addressed before an SOA platform can be considered fully functioning. These elements include:
Another important facet of Sun's SOA Initiative is a services offering, called the SOA Opportunity Assessment, that helps enterprises assess their readiness for the move to a web services-based SOA. The SOA Opportunity Assessment is described in the whitepaper Assessing Your SOA Readiness.
SOA and web services are not just abstract concepts, they're real approaches to solving today's IT problems. A critical mass of widely adopted web services technologies are available today, such as XML, UDDI, SOAP and WSDL. In addition, a core set of Java technologies for web services, such as JAX-RPC and XWS-Security are now available in toolkits such as the J2EE 1.4 SDK and Java Developer Pack 1.5. Tools, such as NetBeans 4.1, are also emerging to simplify the web services development process, and soon SOA management features will be available as part of the Java Enterprise System and Java Studio Enterprise. If you haven't migrated to a web services-based SOA, the time might be now. You can get started toward web services and SOA by assessing your readiness.