The Java EE 5 Tutorial

Building, Packaging, and Deploying the Service Using Ant

To build and package helloservice using Ant, in a terminal window, go to the tut-install/javaeetutorial5/examples/jaxws/helloservice/ directory and type the following:


This command calls the default target, which builds and packages the application into an WAR file, helloservice.war, located in the dist directory.

    To deploy the helloservice example, follow these steps:

  1. In a terminal window, go to tut-install/javaeetutorial5/examples/jaxws/helloservice/.

  2. Make sure the Application Server is started.

  3. Run ant deploy.

You can view the WSDL file of the deployed service by requesting the URL http://localhost:8080/helloservice/hello?WSDL in a web browser. Now you are ready to create a client that accesses this service.

Undeploying the Service

At this point in the tutorial, do not undeploy the service. When you are finished with this example, you can undeploy the service by typing this command:

ant undeploy

The all Task

As a convenience, the all task will build, package, and deploy the application. To do this, enter the following command:

ant all