Setting Up



Setting Up

Before you start developing the example application, you should follow the instructions in this section and in About the Examples (page xx).

1 Getting the Example Code

The source code for the example is in <JWDSP_HOME >/docs/tutorial/examples/gs/, a directory that is created when you unzip the tutorial bundle. If you are viewing this tutorial online, you can download the tutorial bundle from:

http://java.sun.com/webservices/downloads/webservicestutorial.html

The example application at <JWDSP_HOME >/docs/tutorial/examples/gs/consists of the following files.

  • Converter.java The Java class that contains the methods dollarToYenand yenToEuro. These methods are used to convert U.S. dollars to Yen, then convert Yen to Euros.

  • index.jsp The Web client, which is a JavaServer Pages page that accepts the value to be converted, the buttons to submit the value, and the result of the conversion.

  • build.xml The build file that uses the ant tool to build and deploy the Web application.

The rest of this document shows how this example application was created, built, deployed, and run. If you would like to skip the information on creating the example application, you can go directly to the sections describing how to build, deploy, and run the example application, starting with Building and Deploying the Getting Started Application Using Ant (page 59).

2 Checking the Environment Variables

The installation instructions for the Java Web Services Developer Pack explain how to set the required environment variables. Please verify that the environment variables have been set to the values noted in Figure.

Required Environment Variables

Environment Variable

Value

JAVA_HOME

The location of the Java 2 Platform, Standard Edition (J2SE) installation.

JWSDP_HOME

The location of the Java Web Services Developer Pack installation.

PATH

Should include the bin directories of the Java Web Services Developer Pack and J2SE installations. Make sure that these directories are located at the front of your path statement.