The source code for the Coffee Break application is located in the directory <INSTALL>/javaeetutorial5/examples/coffeebreak/. Within the cb directory are subdirectories for each web applicationcb, cb-saaj, and cb-jaxwsand a directory, cb-common, for classes shared by the web applications. Each subdirectory contains a build.xml file. The web application subdirectories in turn contain a src subdirectory for Java classes and configuration files, and a web subdirectory for web resources. Setting the PortThe 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 files before building and running the examples:
Building, Packaging, and Deploying the JAX-WS ServiceTo build the JAX-WS service and client library and to package and deploy the JAX-WS service using NetBeans 5.5, follow these steps:
To build the JAX-WS service and client library and to package and deploy the JAX-WS service using Ant, follow these steps:
Building, Packaging, and Deploying the SAAJ ServiceTo build the SAAJ service and client library and to package and deploy the SAAJ service using NetBeans 5.5, follow these steps:
To build the SAAJ service and client library and to package and deploy the SAAJ service using Ant, follow these steps:
Building, Packaging, and Deploying the Coffee Break ServerTo build, package, and deploy the Coffee Break server using NetBeans 5.5, follow these steps:
To build, package, and deploy the Coffee Break server using Ant, follow these steps:
Running the Coffee Break ClientAfter you have installed all the web applications, check that all the applications are running in the Admin Console. You should see cb, cb-saaj, and cb-jaxws in the list of applications. You can run the Coffee Break client by opening this URL in a web browser: http://localhost:8080/cbserver/ A page appears with the following message: Redirecting to CoffeeBreak demo...click here otherwise. In a few seconds, you should see a page like the one shown in Figure 361. Figure 361. Order FormAfter you have gone through the application screens, you will get an order confirmation that looks like the one shown in Figure 362. Figure 362. Order ConfirmationRemoving the Coffee Break ApplicationTo remove the Coffee Break application, perform the following steps:
If you want to remove the build and dist directories, run ant clean in each directory, including <INSTALL>/javaeetutorial5/examples/coffeebreak/cb-common/. |