Web Services


Web services is one of the most flexible means to connect between client applications and back-end server applications over a network (and, in particular, the Internet). The operation of Web services rides on top of the standard Hypertext Transfer Protocol (HTTP) protocol, the same protocol that enables today’s Internet to flourish. Web services works on the exchange of XML-based messages. XML messages are text messages in a well-defined descriptive format. Text messages are human-readable, and easy to generate or process using most programming languages. The main advantages of communications through Web services include the following:

  • The HTTP protocol is ubiquitous; clients can live wherever Web browsers will work.

  • XML messages are easy to generate and process, and are independent of programming languages, operating systems, or hardware.

  • HTTP tunneling through firewalls is a well-known and stable technology, allowing Web services clients to work behind firewalls.

  • The available Web services on a server can be described in XML, and this list of services can be discovered dynamically by potential clients.

  • It is possible to create technology that dynamically discovers the methods of a Web service interface, then generates the code required to access these methods dynamically - freeing the client developer from tedious code writing.

The J2EE 1.4 specification mandates the support of Web services by all compatible containers. Geronimo supports Web services through the use of Apache AXIS and some custom coding.

AXIS and Web Services

Apache AXIS is the Simple Object Access Protocol (SOAP) engine in the ASF XML-based project family. AXIS includes a set of libraries and tools to create Web services or Web service clients using the Java programming language. You can find more on this at the following Web site:

http://ws.apache.org/axis

Geronimo integrates AXIS to provide a variety of features for software components at all of the J2EE tiers. The next section describes this integration.

Geronimo Web Services Integration

Web services support within Geronimo permeates throughout the different tiers. Table 4-1 provides a synopsis of this support.

Table 4-1: Geronimo Web Services Support
Open table as spreadsheet

J2EE Tier

Web Services Support

Web tier

Web services created with SUN’s Java Web Services Development Pack (JWSDP) can be readily deployed on Geronimo. Servlets can implement the Web service logic with generated client endpoints.

Geronimo’s Web services support is an implementation based on the Apache AXIS engine - and tracks the AXIS features set. AXIS is the same Java Web service engine used by other Open Source application servers.

Geronimo’s support is compatible with the Web services specification.

Business tier

OpenEJB supports EJB 2.1 interfaces. EJB 2.1 interfaces can be configured to be service endpoints and exported as Web service interfaces.

This literally means that any EJB can be exposed as a Web service through configuration. In practice, however, it is typically only useful to expose stateless session beans as Web services.

EJBs that needs to access external Web services can do so via Geronimo’s built-in AXIS libraries.

Figure 4-5 illustrates how Geronimo enables incoming Web services requests to the business tier EJBs, or the Web-tier Web service implementation.

image from book
Figure 4-5: Geronimo support for incoming Web service clients

Figure 4-6 shows how Geronimo support the access to external Web services from either the Web tier or the business tier.

image from book
Figure 4-6: Geronimo support for component access to external Web services

Chapter 14 discusses the details on configuration of Web services and how to configure EJB for access as Web services.

UDDI Support

Geronimo integrates Apache Scout and jUDDI (pronounced “Judy”) to support access to external Universal Description, Discovery, and Integration (UDDI) server. jUDDI is an implementation of a UDDI service in Java. Following is the project Web site for jUDDI:

http://ws.apache.org/juddi

You can consult the Web site for more information on jUDDI. This feature is a preinstalled application module with the full J2EE server download of Geronimo server.




Professional Apache Geronimo
Professional Apache Geronimo (Wrox Professional Guides)
ISBN: 0471785431
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net