background image

Setting the Port

<< The managed-bean element | Deploying the SAAJ Coffee Supplier Service >>
<< The managed-bean element | Deploying the SAAJ Coffee Supplier Service >>

Setting the Port

Setting the Port
The JAX-WS and SAAJ services in the Coffee Break application run at the port that you
specified when you installed the Application Server. The tutorial examples assume that the
Application Server runs on the default port, 8080. If you have changed the port, you must
update the port number in the following file before building and running the examples:
tut-install/javaeetutorial5/examples/coffeebreak/cb-common/src/com/sun/cb/common/
CoffeeBreak.properties
Update the port in the following URLs:
endpoint.url=http://localhost:8080/jaxws-coffee-supplier/jaxws
saaj.url=http://localhost:8080/saaj-coffee-supplier
Building, Packaging, and Deploying the JAX-WS
Coffee Supplier Service
To build the JAX-WS service and client library and to package and deploy the JAX-WS service
using NetBeans IDE, follow these steps:
1. In NetBeans IDE, choose Open Project from the File menu.
2. In the Open Project dialog, navigate to
tut-install/javaeetutorial5/examples/coffeebreak/.
3. Select the cb-jaxws folder.
4. Select the Open as Main Project and Open Required Projects check boxes.
5. Click Open Project Folder.
6. Right-click the cb-jaxws project and choose Build Project.
7. Right-click the cb-jaxws project and choose Deploy Project.
To build the JAX-WS service and client library and to package and deploy the JAX-WS service
using Ant, follow these steps:
1. In a terminal window, go to
tut-install/javaeetutorial5/examples/coffeebreak/cb-jaxws/.
2. Run ant. This task calls the default target, which compiles the source files of the JAX-WS
service.
3. Make sure the Application Server is running.
4. Deploy the JAX-WS service:
ant deploy
Building, Packaging, Deploying, and Running the Coffee Break Application
The Java EE 5 Tutorial · September 2007
1052