10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Building, Packaging, Deploying, and Running the Coffee Break Application<br />

Setting the Port<br />

<strong>The</strong> JAX-WS and SAAJ services in the Coffee Break application run at the port that you<br />

specified when you installed the Application Server. <strong>The</strong> tutorial examples assume that the<br />

Application Server runs on the default port, 8080. If you have changed the port, you must<br />

update the port number in the following file before building and running the examples:<br />

tut-install/javaeetutorial5/examples/coffeebreak/cb-common/src/com/sun/cb/common/CoffeeBreak.properties<br />

1044<br />

Update the port in the following URLs:<br />

■ endpoint.url=http://localhost:8080/jaxws-coffee-supplier/jaxws<br />

■ saaj.url=http://localhost:8080/saaj-coffee-supplier<br />

Building, Packaging, and Deploying the JAX-WS<br />

Coffee Supplier Service<br />

To build the JAX-WS service and client library and to package and deploy the JAX-WS service<br />

using NetBeans IDE, follow these steps:<br />

1. In NetBeans IDE, choose Open Project from the File menu.<br />

2. In the Open Project dialog, navigate to<br />

tut-install/javaeetutorial5/examples/coffeebreak/.<br />

3. Select the cb-jaxws folder.<br />

4. Select the Open as Main Project and Open Required Projects check boxes.<br />

5. Click Open Project.<br />

6. Right-click the cb-jaxws project and choose Build.<br />

7. Right-click the cb-jaxws project and choose Undeploy and Deploy.<br />

To build the JAX-WS service and client library and to package and deploy the JAX-WS service<br />

using Ant, follow these steps:<br />

1. In a terminal window, go to<br />

tut-install/javaeetutorial5/examples/coffeebreak/cb-jaxws/.<br />

2. Run ant. This task calls the default target, which compiles the source files of the JAX-WS<br />

service.<br />

3. Make sure the Application Server is running.<br />

4. Deploy the JAX-WS service:<br />

ant deploy<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!