Home > Articles > Programming > Java

Web Services Part 8: The J2EE Platform, Part 2

  • Print
  • + Share This
Alex Nghiem continues his coverage of the J2EE platform for web services, providing an overview of the Java XML Pack.
Like this article? We recommend


Part 1 of this discussion of the J2EE platform covered the major APIs of the J2EE. This article continues that discussion with an overview of the Java XML Pack, which is part of the Java Web Services Developer Pack (Java WSDP), which in turn includes a host of other things such as a Java Registry Server (a UDDI-compliant registry). We'll also cover the J2EE vendors and their associated products.

The Java XML Pack includes additional APIs specifically for working with web services:

  • Java API for XML Processing (JAXP)

  • Java API for XML Messaging (JAXM)

  • Java API for XML Registries (JAXR)

  • Java API for XML-Based RPC (JAX-RPC)

The following sections briefly describe each of these APIs.

Java API for XML Processing (JAXP)

JAXP is a document-oriented API; through a "pluggability" layer, it allows any XML-compliant parser to be used from within an application.


As discussed previously, XML parsers support either the SAX API (for efficiently parsing XML documents through the use of event handlers) or the DOM API (for building and modifying XML documents through a tree structure).

JAXP also supports namespaces and XML schemas as well as XML Stylesheet Language Transformations (XSLT), which provides both a display mechanism for XML documents and a way to transform XML documents from one format to another.

Java API for XML Messaging (JAXM)

JAXM facilitates developing programs that produce and consume SOAP messages. It provides methods such as creating SOAP messages and adding contents to the SOAP messages.

An application that uses JAXM is known as a JAXM client or a JAXM application. By default, a JAXM application supports only synchronous messaging. To support asynchronous messaging, a JAXM application must use a JAXM provider.

Additionally, the API provides functionality for industry initiatives such as ebXML. We'll get to ebXML in a future article.

Java API for XML Registries (JAXR)

JAXR defines a uniform way of accessing different types of registries. Currently, JAXR supports both the ebXML registry and UDDI registries. It includes functionality for publishing, searching, modifying, and deleting entries in the registry. JAXR also includes sample JAXR clients for browsing well-known registries, including those from Microsoft and IBM.

Java API for XML-Based RPC (JAX-RPC)

JAX-RPC provides an API for building web services and clients using RPCs and XML. Although it uses SOAP for messaging, the application doesn't actually deal with the parts of the SOAP message (as is the case with JAXM).

JAX-RPC supports both static invocation and dynamic invocation. Dynamic invocation is useful in cases where services can be discovered only during runtime.

  • + Share This
  • 🔖 Save To Your Account