JWSDP Installation

The Java Web Services Developer Pack (Java WSDP) is a free integrated toolkit that allows Java developers to build and test XML applications, Web services, and Web applications with the latest Web services technologies and standards implementations. The JWSDP includes the following
  • Apache Tomcat EA development container .
  • Ant Build Tool.
 

Summary

The following summarizes a straight forward installation. Details vary a lot depending on the platform and version.
Download
Install run install shield, place in final directory
Start up Tomcat Set environment variables, run start up script
Install the J2EE jar extract, copy to library, form symbolic links
Configure Ant Environment depends on version
Test ant
 

Download

JWSDP

The JWSDP is available at http://java.sun.com/webservices/downloads/webservicespack.html. The latest version is 1.3. For this you will need Java 1.4. For Mac OS X Java 1.4

For Mac OS X 10.2 or ealier, you will need an earlier version. These can be hard to find. Java(TM) Web Services Developer Pack 1.1 has been available at http://java.sun.com/webservices/downloads/1.1/webservicespack_1.1.html .

J2EE

The ant build tool will need the java 2 Enterprise Edition archive j2ee.jar. For this example we will download version the version from http://java.sun.com/j2ee/sdk_1.3/.
 

Install

    Start the download script. You may need to decompress the download if your browser did not.

    
    	cd download directory
    	chmod +x on jwsdp-1_3-unix.sh
    	./jwsdp-1_3-unix.sh
    

    This will starts install shield. Agree to the license and follow the directions. For the example, we choose the options.

    • place in $HOME/jwsdp-1.1
    • no web proxy
    • typical config with Tomcat

    We now will move the extract to its real home in /Library or /opt

    • Create target directory
      
      	mkdir /Library/JWSDP
      	-- or --
      	mkdir /opt/JWSDP 
      
    • Move/copy jwsdp-1.1 to directory
      
      	mv jwsdp-1.1 /Library/JWSDP 
      
    • Create Home links
      
      	cd /Library/JWSDP 
      	ln -s jwsdp-1.1 Home 
      

      The templates in later sections assume the location is in /opt/tomcat. We create the link. On OS X, you may need to create the /opt directory.

      
      	cd /opt
      	ln -s /Library/JWSDP/jwsdp-1.1 tomcat 
      
 

Start up Tomcat

Look at /Library/JWSDP/docs/tomcat/index.html for info on how to configure and set up tomcat. There is a link for Install and Run under Getting Started. The basic steps are as follows.

  • Set JAVA_HOME to your java installation
  • Set CATALINA_HOME to your container installation
  • Invoke the start up script
    
    	sudo $CATALINA_HOME/bin/startup.sh
    

Use your browser to access the server with http://localhost:8080. Be prepared to wait awhile for tomcat to start. It needs to compile and load alot. If all goes well, you should see a page something like JavaTM Web Services Developer Pack 1.1

The sample files contains a file Mac OS X start up item. You need to

  • edit the Tomcat startup file to match your installation.
    
    	export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
    	export CATALINA_HOME="/Library/JWSDP/Home"
    
  • Place the startup in the /Library/StartupItems
    
    	sudo mv Tomcat /Library/StartupItems
    
 

Install the J2EE jar

We only need to unpack the download and move it to our java environment.

tar xf j2sdkee1.3.1.tar
cd j2sdkee1.3.1/lib
cp j2ee.jar  /Library/Java/Extensions
Linux will of course have a different location.

The templates scripts assume common jars are in /usr/local/java/java-lib. Thus you may wish to link this to your actual location.


	sudo mkdir /usr/local/java
	sudo mkdir /usr/local/java/java-lib
	sudo ln -s /Library/Java/Extensions /usr/local/java/java-lib
 

Configure Ant Environment

Different distributions place items in different locations and have different needs. Thus you need to find the ant documentation for your release.

For jwsdp-1.1, the ant build tool needs several evironment variables set.

  • ANT_HOME; the location of the ant installation
  • JAVA_HOME: the location of the java installation
  • CLASSPATH: location of classes. Need to include j2ee.jar and ant.jar.

The quickest thing is perhaps to set these in you login script in ~/.login. You will probably also want to add the ant executable to your path.


	set path=( ${path} "/opt/tomcat/bin" )

You can also look at the script in $ANT_HOME/bin/ant for ideas.

 

Test

A quick test is to move to a clean directory and execute ant. You should see a message that the build.xml is missing.


	% ant
	Buildfile: build.xml does not exist!
	Build failed

NOTE: If you get errors like " class not found", you probably do not have the CLASSPATH set to the liking of ant.

We will wait until the next section to test the ant build.

 
 

eden logo Copyright 2004. Lester Pieniazek. All rights reserved Worldwide.