Home arrow Web Services arrow Using EJBs with Axis

Using EJBs with Axis

Read this article if you would like to learn how to use SOAP, WSDL, and the Web services stack with J2EE. The second of three parts, this section focuses on EJBs and Axis. It is excerpted from chapter 7 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418).

Author Info:
By: Sams Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
May 25, 2006
  1. · Using EJBs with Axis
  2. · Using EJBs from Axis
  3. · The Session Bean
  4. · The Deployment Unit
  5. · Exposing the EJBs via Axis

print this article

Using EJBs with Axis
(Page 1 of 5 )

J2EE Versions

A word about versions: While J2EE 1.4 has just been released, J2EE 1.3 is still the more commonly used version in real systems at the time of this writing. J2EE 1.4 includes significant Web services support, especially the standards JAX-RPC, JAX-R, and JSR 109 ("Implementing Enterprise Web Services"), as well as improvements specifically targeted at producing WS-I Basic Profile compliance (http://ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html).

As a result, every J2EE application server will support the following:

  • A UDDI registry

  • Calling out to external Web services through JAX-RPC

  • Hosting Web services using EJBs and servlets

  • Calling out to UDDI servers

The rest of this chapter is split into three parts. First, we create the EJBs that form the core of the application. This isn't a full tutorial on EJBs, but just a simple EJB application that allows SkatesTown to get going.

Next, we investigate using Web services with an existing J2EE server by using the Apache Axis toolkit. In this section, we assume that there is a running J2EE server such as BEA WebLogic, JBOSS, or IBM WebSphere, and we look at using the Apache Axis framework to connect to EJBs. We're doing this because the SkatesTown developers are familiar with Axis and would like to understand how EJBs fit into the model they already have; and although this is more difficult than the approach in the last part of the chapter, not all application servers support that approach yet.

Finally, we look at how this model is simplified and updated when we utilize new support from J2EE 1.4 to deploy a service directly into an enabled J2EE container. This support (called JSR109) simplifies the model considerably. In this part, we'll use IBM WebSphere as the container, and we'll clearly call out the standard aspects versus the application server–specific aspects. Once J2EE 1.4 is widespread, this will be the standardized approach to using Web services with J2EE, and all J2EE 1.4 application servers will need to support this model.

This last approach is much less work than using Axis, because the tooling and container do much of the work for you; so, if you have a JSR109-enabled container, you may wish to skip trying the Axis approach. However, we recommend reading the section in order to understand the differences between the two approaches and how EJBs fit into the Axis approach.

blog comments powered by Disqus

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials