You can build, package, and deploy the helloservice application using either NetBeans IDE or ant.
Follow these instructions to build, package, and deploy the helloservice example to your Application Server instance using the NetBeans IDE IDE.
In NetBeans IDE, select File->Open Project.
In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/jaxws/.
Select the helloservice folder.
Select the Open as Main Project check box.
Click Open Project.
In the Projects tab, right-click the helloservice project and select Undeploy and Deploy.
This builds and packages to application into helloservice.war, located in tut-install/javaeetutorial5/examples/jaxws/helloservice/dist/, and deploys this WAR file to your Application Server instance.
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:
ant |
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:
In a terminal window, go to tut-install/javaeetutorial5/examples/jaxws/helloservice/.
Make sure the Application Server is started.
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.
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 |
As a convenience, the all task will build, package, and deploy the application. To do this, enter the following command:
ant all |