The JavaTM Web Services Tutorial
Home
TOC
Index
PREV TOP NEXT
Divider

Introduction to Web Services

Maydene Fisher

Web services, in the general meaning of the term, are services offered via the Web. In a typical Web services scenario, a business application sends a request to a service at a given URL using the SOAP protocol over HTTP. The service receives the request, processes it, and returns a response. An often-cited example of a Web service is that of a stock quote service, in which the request asks for the current price of a specified stock, and the response gives the stock price. This is one of the simplest forms of a Web service in that the request is filled almost immediately, with the request and response being parts of the same method call.

Another example could be a service that maps out an efficient route for the delivery of goods. In this case, a business sends a request containing the delivery destinations, which the service processes to determine the most cost-effective delivery route. The time it takes to return the response depends on the complexity of the routing, so the response will probably be sent as an operation that is separate from the request.

Web services and consumers of Web services are typically businesses, making Web services predominantly business-to-business (B-to-B) transactions. An enterprise can be the provider of Web services and also the consumer of other Web services. For example, a wholesale distributor of spices could be in the consumer role when it uses a Web service to check on the availability of vanilla beans and in the provider role when it supplies prospective customers with different vendors' prices for vanilla beans.

In This Chapter
The Role of XML and the Java Platform
What Is XML?
What Makes XML Portable?
Overview of the Java APIs for XML
JAXP
The SAX API
The DOM API
The XSLT API
JAX-RPC
Overview of JAX-RPC
Using JAX-RPC
Creating a Web Service
Coding a Client
Invoking a Remote Method
JAXM
Getting a Connection
Creating a Message
Populating a Message
Sending a Message
JAXR
Using JAXR
Sample Scenario
Scenario
Conclusion
Divider
Home
TOC
Index
PREV TOP NEXT
Divider

This tutorial contains information on the 1.0 version of the Java Web Services Developer Pack.

All of the material in The Java Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.