|
J2EE 1.4: A Web Services Kit
New platform features and APIs enhance Web services technologies in Java and bring platform-neutral Web services to the enterprise
by Peter Varhol
August 2003 Issue
With the upcoming release of the final version of the Java 2 Platform, Enterprise Edition (J2EE) 1.4 specification, developers have the opportunity to make use of a compelling set of new features, primarily geared toward building and deploying Web services. Because the rise of Web services largely postdated the development of J2EE 1.3, and because the Java Community Process (JCP) needed time to produce Web services technology, Web services became the natural centerpiece of the 1.4 specification.
In fact, Web services have become such an important part of the landscape of enterprise-level computing that several components of the Web services technology were released before 1.4, at least in early adopter form. For example, early adopter versions of the Java API for XML (JAX) and the SOAP with Attachments API for XML (SAAJ) could be downloaded for use as early as last year. So much of what comprises the Web services features of J2EE 1.4 is no surprise, at least to those who have already started building these components.
The new features and enhancements for J2EE 1.4 can be divided broadly into three categories: new Web services capabilities, new APIs not related to Web services, and enhancements to existing technologies (see Table 1). Possibly the most important part of J2EE 1.4 is the Web Services for J2EE specification, which describes the packaging and deployment requirements for J2EE applications that either include Web services or use them. The Web Services for J2EE specification describes the deployment of JAX-RPC-based services and application clients, which combines with the JAX-RPC and Enterprise JavaBean (EJB) 2.1 specifications to spell out the complete Web services story. Let's take a look at how they fit together.
A Web services component can communicate with J2EE applications in two ways. First, the application can access a Web service that was created using JAX-RPC. The JAX-RPC specification defines client APIs for accessing Web services as well as techniques for implementing Web service endpoints. The JAX-RPC specification also describes the support provided for message handlers that can process message requests and responses between application and component. Behind the scenes in such an application, JAX-RPC uses a Servlet to implement the Web services connectivity.
The second standard way of working with Web services is an application that can access a stateless session bean through a new construct called the Web service endpoint interface. This approach is interesting because it enables the EJB to operate directly as a Web service by the way it's deployed. The EJB 2.1 deployment descriptor includes a new element called service-endpoint, which contains the name of the enterprise bean's Web service endpoint interface. During deployment, the EJB container will generate the classes that implement the Web service endpoint interface.
Back to top
|