File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Error while deploying the war file using command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error while deploying the war file using command "asant deploy"" Watch "Error while deploying the war file using command "asant deploy"" New topic

Error while deploying the war file using command "asant deploy"

vargoyal goyal

Joined: Nov 05, 2009
Posts: 3

I am trying to code as per the javaee5 tutorial, i am following the tutorial as follows

Coding the Service Endpoint
Implementation Class
In this example, the implementation class, Hello, is annotated as a web service
endpoint using the @WebService annotation. Hello declares a single method
named sayHello, annotated with the @WebMethod annotation. @WebMethod
exposes the annotated method to web service clients. sayHello returns a greeting
to the client, using the name passed to sayHello to compose the greeting.
The implementation class also must define a default, public, no-argument constructor.
package helloservice.endpoint;
import javax.jws.WebService;
public class Hello {
private String message = new String("Hello, ");
public void Hello() {}
public String sayHello(String name) {
return message + name + ".";
Building the Service
To build HelloService, in a terminal window go to the
<INSTALL>/javaeetutorial5/examples/jaxws/helloservice/ directory and
type the following:
asant build
The build task command executes these asant subtasks:
• compile-service

The compile-service Task
This asant task compiles, writing the class files to the build subdirectory.
It then calls the wsgen tool to generate JAX-WS portable artifacts used
by the web service. The equivalent command-line command is as follows:
wsgen -d build -s build -classpath build
The -d flag specifies the output location of generated class files. The -s flag
specifies the output location of generated source files. The -classpath flag
specifies the location of the input files, in this case the endpoint implmentation
class, helloservice.endpoint.Hello.
Packaging and Deploying the Service
You package and deploy the service using asant.
Upon deployment, the Application Server and the JAX-WS runtime generate any
additional artifacts required for web service invocation, including the WSDL
Packaging and Deploying the Service with
To package and deploy the helloservice example, follow these steps:
1. In a terminal window, go to
2. Run asant create-war.
3. Make sure the Application Server is started.
4. Set your admin username and password in
5. Run asant 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.

It gives me the following error while trying to deploy the war file using command "asant deploy".

C:\jwstutorial20\examples\jaxws\helloservice\build.xml:29: The following error occurred while executing this line:
C:\jwstutorial20\examples\common\targets.xml:125: An exception occurred while running the command. The exception message is: CLI171 Command deploy failed : Unable to find the archive to be deployed in specified location..

I am following the following tutorial ""

first example from Building Web Services
with JAX-WS chapter.
I agree. Here's the link:
subject: Error while deploying the war file using command "asant deploy"
jQuery in Action, 3rd edition