No one can dispute that the Web has fundamentally altered the way we shop, do business and are entertained. But underneath it all, the Web remains what it has always been-an enormous collection of networks that offers a pervasive and accessible medium for content and services. So what is new on the horizon for net-centric computing on the Web?
At the moment, service providers and developers of hardware and software for everything from applications servers, desktop computers, Web-enabled handheld information appliances and wireless cell phones to a variety of embedded systems are intrigued by the Web-services approach to network-centered computing.
Web services are applications or services that can be accessed over the Web using standard Web protocols. For example, a Web service might provide stock quotes, credit authorization, or materials procurement. Web services communicate using platform-independent and language-neutral Web protocols, which makes it much easier to integrate heterogeneous systems. The Web-services model is destined to become the predominant mechanism to implement business-to-business integration. Web services promise to deliver better cross-business integration, improved efficiency and closer customer relationships.
At Sun, we expect that the Web-services model will eventually permeate all aspects of business and consumer network-centered computing. As the underlying technology matures, Web services will evolve and begin to operate in an extremely intelligent and dynamic way. These smart Web services will understand the context of each request and produce dynamic results based on each specific situation. The services will adapt their processes based on the user's identity, preferences, location and reason for the request. Multiple services will be combined on the fly, collaborating to produce a unique, customized solution. The mechanics of this collaboration will be completely transparent to the consumer, who will experience only the collective benefit delivered by the end result.
The definitive characteristic of a Web service is its interface. A Web service exposes an application-to-application programming interface, which can be invoked from any type of application client or service using standard Web protocols. The Web-service interface acts as a liaison between the Web and the actual application logic that implements the service.
The industry is clearly converging on the Extensible Markup Language (XML) as the lingua franca for Web services. Most Web services communicate by passing XML messages. The Web-service interface parses the XML message, extracts the pertinent data, and invokes the back-end application logic to respond to the request.
What is most intriguing about XML-based Web services is that it doesn't matter what languages or platforms are used to build and deploy the application logic behind the Web-service interface.
XML-based Web services communicate over standard Web protocols, such as HTTP or the Simple Network Management Protocol (SNMP). The Web-service interface must be able to communicate using these Web protocols, and it has to be able to translate XML into language-specific data formats. The Web-service interface runs in a Web server, but the application logic that implements the service can run anywhere. The application logic can be a new application written specifically to support the Web service, or it might be an encapsulated legacy application.
A raft of new XML-based technologies is emerging to support the Web-services programming model. These technologies are the precursors to standards that will enable Web services. As such, these technologies are likely to form the global framework for Web services collaboration, including the Simple Object Access Protocol (Soap), the Web Services Description Language (WSDL), the Universal Description, Discovery and Integration (UDDI) protocol and the electronic business XML dialect (ebXML).
Soap is an extensible XML messaging protocol that forms the foundation for most Web services. Soap supports both a messaging and an RPC (remote procedural call ) programming model. There are more than 50 Soap implementations currently available for a wide assortment of programming languages. Many implementations are open-source. Soap is the basis for the XML Protocol (XMLP) standards effort of the World Wide Web Consortium.
WSDL is an XML language for describing a Web-service interface. A number of Soap implementations now include support for WSDL. WSDL tools can either generate Soap interfaces from WSDL descriptions or generate WSDL descriptions from application code.
UDDI is a Web-based business registry that can be used to describe and discover Web services. The UDDI Business Registry is a global, public directory of businesses and services.
A Soap-based business-to-business framework--ebXML-extends Soap by providing a reliable and secure communications framework. ebXML provides specifications that can be used to express a complex B2B transaction as a choreographed sequence of business service exchanges.
Web services communicate through their service interfaces, which are described using WSDL and implemented using either Soap or ebXML Message Service. Each service is registered in the UDDI Business Registry, while metadata about the service and the business process associated with the service is stored in the ebXML repository.
At build time, the developer finds a service through the UDDI Business Registry, locates the WSDL file for the service and obtains additional service metadata from the ebXML repository. Based on this metadata, the developer constructs a matching interface that can communicate with the target service. At run-time, the services communicate by exchanging XML messages using Soap or the ebXML message service.
Although these technologies haven't quite reached standardization status, developers can certainly begin developing Web services today. Java technology has established itself as one of the most popular programming languages for building Web services. The Java platform includes native support for XML, and most XML tools support the Java language. Java technology is the ideal partner with XML for creating, assembling and deploying portable Web services. The two standards enable heterogeneous platforms and software to share data and work together seamlessly.
We have proposed an open software architectural framework to support Web services. Called Open Net Environment (ONE), it is based on a recommended set of open and pervasive standards, technologies and protocols. At its core, the ONE architecture is based on XML and Java technology. Sun's technical philosophy is to use common, pervasive technologies, use what is available, and avoid reinventing the wheel. The architecture ensures that Web services, developed using any tool and running on any platform, can seamlessly operate with each other.
The Open Net Environment includes a developer model that provides guidelines for building Web services. The principles defined within the developer model apply to any programming language, but the ONE developer model specifies programming practices in terms of Java application programming interfaces (AP!s). From a developer's perspective, a Web service consists of a Web-service interface and one or more service components. The Web-service interface manages and manipulates XML messages. The service components contain the application logic that implements the service. The service components frequently interact with external resources and services through a variety of integration services.
A vital part of the ONE framework is the use of a number of Java APIs for XML. The Java platform includes native support for XML through the Java API for XML Processing. Additional Java APIs for XML are in various stages of development through the Java Community Process (JCP). The complete suite of Java APIs for XML includes the following:
- The Java API for XML Processing (JAXP) provides a Java interface to the standard XML programming APIs: DOM, SAX and XSLT;
- The Java API for XML Data Binding (JAXB) binds XML data to Java code. A developer uses JAXB to compile XML schema information into Java objects. At run-time, JAXB automatically maps the XML document data to the Java object and vice versa;
- The Java API for XML Messaging (JAXM) provides a native Java interface to XML messaging systems, such as ebXML Message Service, XMLP and Soap;
- The Java APIs for XML-based RPC (JAX/RPC) provide direct support for an RPC programming convention for XML messaging systems, such as Soap and XMLP;
- The Java API for WSDL (JWSDL) provides an API to inspect, create and manipulate WSDL descriptions;
- The Java API for XML Registries (JAXR) provides an interface to XML registries and repositories, such as the ebXML registry/repository and the UDDI Business Registry;
A Web service communicates by passing XML documents over standard Web protocols like HTTP. The Web-service interface implements the code that produces and consumes the XML messages. The ONE architecture recommends using either Soap or the ebXML Message Service.
A Web-service interface runs as a JSP (Java server page) or servlet running within a Web server. A service consumer invokes a Web service by posting an XML message to the URL representing the JSP page. The service interface receives the XML message and extracts the XML document. Currently, this process is performed using Soap or ebXML APIs. In the future, developers will be able to use JAXM or JAX/RPC to more efficiently process the XML message. The service interface takes the XML document and maps the XML data into Java object data. Today, developers can use JAXP to process the XML document. Eventually, developers will be able to use JAXB to automatically bind the document to a Java object.
From XML to Java
Once the service interface has mapped the XML data to Java data, it invokes the application logic, which performs the actual service. The application logic is implemented as one or more Enterprise Java Beans components, or, possibly, servlets for light-duty applications.
The application logic component will need to interface with various resources. The Java database API provides access to databases; J2EE (Java 2 Platform Enterprise Edition) connectors and the Java Message Service (JMS) API can be used to access other application systems; and XML messages are used to interface with other Web services. For the moment, developers need to construct XML messages using the Soap and ebXML APIs. In the future, developers will use JAXM or JAX/RPC to more easily manipulate XML messages.
When the application logic component has completed its work, it returns a Java result object to the JSP page or servlet interface component. The interface component maps the results from the Java object to the output XML document using JAXP or, down the road, JAXB. The output document can be customized to suit the consumer's requirements.
For example, if the consumer is a business-to-business application user, the interface component can map the results into a specific message format. If he or she is making an inquiry through a browser, the results can be mapped into HTML. If the consumer is a Wireless Application Protocol-enabled mobile phone user, the results can be rendered into Wireless Markup Language (WML). If the consumer is a telephone user interacting through an interactive voice-response system, the results can be transformed into VoiceXML. The transformations are accomplished using JAXP and XSLT. When ready, the response is packaged back up into an XML message and returned to the requestor.
The Sun ONE architecture is being used today to create Web services. As mentioned earlier, ONE is an open architecture that can be implemented using any vendor's products. Sun's offering, called the Sun ONE platform, is composed of an integratable software stack that extends from the application layer to the OS/hardware layer.
Sun's ONE implementation includes a rich developer environment targeted specifically at the Sun ONE platform. This includes both intuitive tools for business professionals and more technical tools for programmers building software components from scratch. The development environment includes the Forte for Java integrated development environment, which is used to build and assemble Web services. New plug-ins for Forte for Java add support for Soap, WSDL and UDDI protocols.
Sun's ONE portfolio includes a collection of ready-made applications and services, which can be assembled into Web services. The iPlanet Communications portfolio provides land-based and wireless access services to e-mail, calendar, instant-messaging and other host-based Web services. The iPlanet Commerce portfolio includes a comprehensive suite of e-commerce services to buy, bill, sell and trade on the Web. In addition, Sun's ONE WebTop Developer provides a host-based personal-productivity suite of applications, which can be accessed over the Web from any type of client interface or device.
Sun's ONE implementation also includes a complete, integrated deployment platform for Web services, including Web, application, integration, directory and portal servers; and a unified user-management portfolio for identity, security and policy management-all running on Sun's Solaris OS and Sparc-based server hardware.
See related chart