Why Web services on Java?

reviews
Jun 6, 20033 mins

Java offers an abundance of tools and APIs that facilitate Web services development

Web services aren’t a technology unto themselves, but rather a new programming model that simply makes use of a few common technology specifications. The basic building blocks of a Web service are some form of XML messaging, such as SOAP or XML-RPC (Remote Procedure Call), and a Web communications protocol, most often HTTP or HTTPS. There are also standards for describing the interface of a Web service (WSDL), facilitating integration among services, and for publishing service information to directories (UDDI), so that potential users can find them.

Many vendors, including Microsoft, claim to support the SOAP, XML-RPC, WSDL, and UDDI specifications, so where’s the compelling argument for using J2EE? There isn’t one. Web services are simply the latest model for distributed, Web-enabled application programming, which puts J2EE servers on the menu by default. Companies are already running Web applications on J2EE app servers, and they will want to expose many of those apps as Web services. So it makes sense to implement Web services on the same platform.

There are advantages to taking the Java route to Web services, not the least of which is an abundance of tools and APIs specific to Web service development. For example, the JAXR (Java API for XML Registries) is used by several J2EE tools — most notably UDDI4J (a Java implementation of UDDI) and WSIL4J (Web Services Inspection Language for Java) — to manage the conversion process between UDDI registrants and the Java model of objects and classes. Big-name J2EE vendors have added to the Web services tool menu as well. IBM has put out WSDL2Java and Java2WSDL, two tools that generate Java from WSDL and WSDL from Java, respectively.

To ease the development of SOAP end points, there’s the JAX-RPC (Java API for XML-RPC), which uses a Java version of the SOAP protocol. Finally, Java is oriented toward object/class/method programming, whereas XML is necessarily oriented toward a document paradigm. So some conversion technology is required at even this basic layer. Here again, Java doesn’t disappoint; its JAXP (Java API for XML Processing) includes tools to parse DOM (Document Object Model) and SAX (Simple API for XML) documents within a Java development environment.

J2EE 1.4, due to be released this summer, will include even more Web service-specific features. In the meantime, shops already using a J2EE application server to develop and deploy Web-enabled applications will get a better handle on Web service development by taking advantage of the tools covered here.

Those shopping for a J2EE app server today should make sure it contains development and management tools specific to these technologies. Most commercial-grade application server products will fit this bill, and bring other important benefits as well, including enterprise-class support for back-end databases and legacy systems, granular monitoring and management, and reliability features such as caching, clustering, load balancing, and resource allocation and pooling.