Quick Review:Ajax
Deploy Web services in Apache Geronimo

First published by IBM developerWorks at Visit developerWorks for more tutorials on open standard technologies, IBM products, and more.

Walk through the process with Amazon Web services

Level: Intermediate

28 Jun 2005

Deciding on an application server to support your Web services development efforts? Meet the Apache Geronimo application server, one of the latest projects from the Apache Software Foundation. Java™ specialist Kunal Mittal introduces you to Geronimo's Web services capabilities by showing you how to write and develop standard J2EE Web services code in Geronimo. You'll learn how to consume Amazon Web services using Apache Axis as the underlying Simple Object Access Protocol (SOAP) implementation, and you'll see how to use a simple JavaServer Pages (JSP)-based client to access the Web service.

Geronimo supports Web services standards

The new Apache Geronimo project is a powerful open source J2EE application server built on top of J2EE 1.4 standards. It uses all open source implementations and will soon be J2EE compliant. Interestingly, Geronimo is built upon a collection of code gathered from many other open source projects. Geronimo uses Apache Axis and Apache Scout (see Resources) to support the following Web services standards:

  • Java Specification request (JSR) 109 (implementing Enterprise Web Services 1.1)
  • Java API for XML-based Remote Procedure Call (JAX-RPC)
  • SOAP with Attachments API for Java (SAAJ) 1.2
  • Java API for XML Registries (JAXR) 1.0

Support for these standards makes Geronimo a viable option when deciding on an application server to support your Web services development efforts. If you've already used the open source projects that make up Geronimo, the transition to Geronimo as your deployment container should come naturally. To make development and deployment of J2EE applications on Geronimo even easier, several Eclipse plug-ins are also available. These plug-ins are part of the Eclipse Web Tools Platform (WTP) (scheduled to have its 1.0 launch in July 2005). See Resources for links to the WTP and related information.

Using Amazon Web Services (AWS) as an example, you'll learn how to consume Web services with Geronimo. You'll be guided through taking the Web Services Description Language (WSDL) for AWS and using Apache Axis to build the consumer code. You'll see a simple Java class that consumes the Web service and learn how this class is invoked from a JSP file to display the results of the Web service. Finally, you'll bundle the code as a J2EE WAR file and deploy it on Geronimo.

Consuming Amazon Web Services

To consume AWS, you need to build the service consumer using Apache Axis as the SOAP implementation. (Axis is the underlying SOAP implementation that Geronimo supports.) If you have done this in the past and have the code, feel free to jump ahead.

Requirements for generating AWS code

Begin by setting up your environment. To generate the AWS consumer code, you need four things:

  • Java software development kit (JDK) 1.4.2 or later. (See Resources to link to the Java Web site.)
May 2008 | Java Jazz Up | 22
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

, 31, 32, 33, 34, 35, 36, 37 Download PDF