Java Reference
In-Depth Information
Creating and packaging Web Service
classes
Next, create a
build.xml
Apache Ant script in the
Application
Sources
directory
by selecting
Categories
:
General
|
Ant
and
Items
:
Empty
Buildfile
in the
New
Gallery
window. The
build.xml
file is created to compile the EJB 3.0 classes and
Web Service classes, and package the classes to an EAR file.
Deploy the EAR file to the WebLogic server. In the
build.xml
file, specify properties
for various directories that are used for development and deployment of the
web service.
Property
Description
src.dir
The source directory for the EJB 3.0 classes and the web service
classes.
deploy.dir
The deploy directory of the WebLogic server:
C:/Oracle/
Middleware/wlserver_10.3/samples/domains/wl_
server/autodeploy
.
build.dir
The build directory for developing the web service application
classes.
build.classes.
dir
The directory for the compiled classes.
Specify the project classpath with the
path
element:
<path id="project.classpath">
<pathelement location="C:/Oracle/Middleware/wlserver_10.3/server/
lib/weblogic.jar"/>
<pathelement path="C:/Oracle/Middleware/jdk160_05/lib/tools.jar"/>
</path>
Specify a
target
for various stages of the application development.
Target
Description
clean
Deletes the directories and JAR/WAR/EAR files generated from the
previous compilation.
prepare
Create the required build directories.
compile
Compile the EJB 3.0 classes using the
javac
task. Has dependency
on the
prepare
target.
jar
Create a EJB JAR file for the EJB 3.0 classes, including
persistence.xml
. Has dependency on the
compile
target.
Search WWH ::
Custom Search