The Java Web Services Tutorial is a comprehensive, example-driven, "roll up your sleeves and dive in" guide to building Web services applications with Java technology. This edition provides a head start on using the Java Web Services Developer Pack (WSDP) from Sun Microsystems. This complete, ready-to-use package includes a variety of technologies and tools required to build and deploy comprehensive Web services applications today.
Web services offer powerful new ways for enterprises to effectively communicate with each other using diverse computing hardware. This paradigm takes the Java platform's "Write Once, Run Anywhere" capabilities to a new level by providing a completely portable data model. By supporting the latest standards for XML-based Web services, the Java APIs for XML make it easy to build Web services with minimal hand tweaking of data. This tutorial explains these APIs in detail and provides practical examples to reinforce your understanding of key concepts.
The accompanying CD-ROM includes:
This package also includes instructions for deploying Web services applications on the Java 2 SDK, Enterprise Edition.
1. Introduction to Web Services.
The Role of XML and the Java Platform.
What Is XML?
What Makes XML Portable?
Overview of the Java APIs for XML.
The SAX API.
The DOM API.
The XSLT API.
Getting a Connection.
Creating a Message.
Populating a Message.
Sending a Message.
Introduction to XML.
What Is XML?
Why Is XML Important?
How Can You Use XML?
XML and Related Specs: Digesting the Alphabet Soup.
Linking and Presentation Standards.
Standards That Build on XML.
Designing an XML Data Structure.
Saving Yourself Some Work.
Attributes and Elements.
Getting the Example Code.
Checking the Environment Variables.
Creating the Getting Started Application.
The Converter Class.
The Web Client.
Building and Deploying the Getting Started Application Using Ant.
Setting the CLASSPATH.
Creating the Build File for Ant.
Compiling the Source Files.
Deploying the Application.
Running the Getting Started Application.
Running the Web Client.
Shutting Down Tomcat.
The Java™ Web Services Tutorial is a beginner's guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP). The Java WSDP is an all-in-one download containing key technologies to simplify building of Web services using the Java 2 Platform. The technologies available on the Java WSDP are:
To provide a development and deployment environment, the Java WSDP includes the:
Here we cover all the things you need to know to make the best use of The Java™ Web Services Tutorial.Who Should Use This Tutorial
This tutorial is intended for programmers interested in developing and deploying Web services and Web applications on the Java WSDP.About the Examples
This tutorial includes many complete, working examples.
To understand the examples you will need a good knowledge of the Java programming language, SQL, and relational database concepts. The following topics in the Java Tutorial are particularly relevant:
This section tells you everything you need to know to obtain, build, deploy, and run the examples.
If you are viewing this online, you need to download The Java Web™ Services Tutorial from:http://java.sun.com/webservices/downloads/webservicestutorial.html
Once you have installed the tutorial bundle, the example source code is in the <JWSDP_HOME>/docs/tutorial/examples directory, with subdirectories for each of the technologies included in the pack.
This tutorial documents the Java WSDP EA1. To build, deploy, and run the examples you need a copy of the Java WSDP and the Java 2 Platform, Standard Edition (J2SE™) SDK 1.3.1 or 1.4. You can download the Java WSDP from:http://java.sun.com/webservices/downloads/webservicespack.html
the J2SE 1.3.1 SDK from:http://java.sun.com/j2se/1.3/
or the J2SE 1.4 SDK from:http://java.sun.com/j2se/1.4/
Most of the examples are distributed with a configuration file for version 1.4.1 of ant, a portable build tool contained in the Java WSDP. Directions for building the examples are provided in each chapter.
Most of the Java WSDP examples run on Tomcat. Before you can run an example you must first deploy it on Tomcat. To deploy an application execute ant deploy. The deploy task usually copies some files into the <JWSDP_HOME>/webapps directory. Some things you need to keep in mind:
You run Tomcat by executing the startup script in a terminal window.
You reload an application with the command:
This command invokes the manager Web application. Before you can use this application you must add your user name and password combination and associate the role name manager with it to <JWSDP_HOME>/conf/tomcat-users.xml, which can be edited with any text editor. This file contains an element <user> for each individual user, which might look something like this: The Tomcat reference documentation distributed with the Java WSDP contains information about the manager application. For further information on the technologies discussed in this tutorial see the reference documentation contained in the Java WSDP (<JWSDP_HOME>/docs/index.html). References to individual technology homes listed in some chapters map as follows:
This command invokes the manager Web application. Before you can use this application you must add your user name and password combination and associate the role name manager with it to <JWSDP_HOME>/conf/tomcat-users.xml, which can be edited with any text editor. This file contains an element <user> for each individual user, which might look something like this:<user name="adeveloper" password="secret" roles="manager" />
The Tomcat reference documentation distributed with the Java WSDP contains information about the manager application.Related Information
For further information on the technologies discussed in this tutorial see the reference documentation contained in the Java WSDP (<JWSDP_HOME>/docs/index.html). References to individual technology homes listed in some chapters map as follows: