File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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

vargoyal goyal
Greenhorn

Joined: Nov 05, 2009
Posts: 3
Hi,

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;
@WebService()
public class Hello {
private String message = new String("Hello, ");
public void Hello() {}
@WebMethod()
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 Hello.java, 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
helloservice.endpoint.Hello
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
file.
Packaging and Deploying the Service with
asant
To package and deploy the helloservice example, follow these steps:
1. In a terminal window, go to
<INSTALL>/javaeetutorial5/examples/jaxws/helloservice/.
2. Run asant create-war.
3. Make sure the Application Server is started.
4. Set your admin username and password in
<INSTALL>/javaeetutorial5/examples/common/build.properties.
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 "http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/AboutJWSDP4.html"

first example from Building Web Services
with JAX-WS chapter.
 
Don't get me started about those stupid light bulbs.
 
subject: Error while deploying the war file using command "asant deploy"