Chapter 19 of the EJB book explained the web services APIs available in EJB 3.0. The exercises in this chapter walk you through exposing and using an EJB as a web service.
This exercise exposes
TravelAgentBean, which was developed in
Chapter 4, as a web service
using JAX-WS. To demonstrate interoperability, and to provide example
material for the JAX-RPC sections, the client that calls
TravelAgentBean will use the JAX-RPC API. We
will begin by building and deploying the EJB-JAR and the Java EE application client JAR.
Start up JBoss as described in Workbook 1.
You do not need to create any database tables because we will use the same persistence configuration in the exercises for Chapter 4, which will generate the tables automatically.
Perform the following steps:
Open a command prompt or shell terminal and change to the ex19_1 directory created by the extraction process.
variables to point to where your JDK and JBoss 4.0 are
C:\workbook\ex19_1> set JAVA_HOME=C:\jdk1.5.0 C:\workbook\ex19_1> set JBOSS_HOME=C:\jboss-4.0.x
$ export JAVA_HOME=/usr/local/jdk1.5.0 $ export JBOSS_HOME=/usr/local/jboss-4.0
ant to your
execution path. Ant is the build utility.
C:\workbook\ex19_1> set PATH=..\ant\bin;%PATH%
$ export PATH=../ant/bin:$PATH
Perform the ...