Assignment 1 - Due on
|
Last modified
- Alecia Garcia
- Causten Stehle
- Corley Schaller
- Craig Print
- Dave Taylor
- Denise Blais
- Gabriel Asare
- Hazel Thomas
- Joseph Acampora
- Judith Davy
- Kurian Chacko
- Rasal Mowla
- Steve Duncan
Tomcat - http://jakarta.apache.org/tomcat/
AXIS - http://ws.apache.org/axis/
Xerces - http://xml.apache.org/xerces2-j/index.html
Java - http://java.sun.com/
Background on XML Schemas - http://www.w3schools.com/schema/default.asp - and XSLT stylesheets - http://www.w3schools.com/xsl/default.asp.
TextPad - http://www.textpad.com/download/index.html
Matrix FAQ - http://csis.pace.edu/support/faq.htm
Tomcat - Servlet/JSP Container for Server Side Processing (although its all local on your machine).
Download the binary distribution 4.1.31 zip. Unzip to a directory (i.e. C:\Pace\Tomcat). Make sure you unzip it using existing folders.
Setup Tomcat Manager so you do not have to constantly startup and shutdown Tomcat. In other words, you can stop and start a particular webapps folder only.
You should take note of a couple of important directories under Tomcat - \webapps is where you'll be setting up axis (web service provider) and your web service consumer. Also, you should note the \common directory. Here you'll find subdirectories classes and lib. In lib you'll typically find .jar files which are basically zip files that contain many classes.
Java JDK - See screen below. Make sure you download the item on the right (the SDK).
After you download it and install it (you may consider using the install directory as C:\Pace\Java to keep everything together), take note of the directory structure and find the jdk directory (i.e. C:\Pace\Java\AppServer\jdk). Note the bin subdirectory under this which cointains among other programs, the java compiler javac.exe.
Download and install Textpad from the link above. You can open and create .java files which can then be compiled into .class files (machine executable). In Textpad, go to the Configure menu and Preferences submenu. Open up Tools and highlight Tools. You can add a button to your Java compiler. See below.
The classpath parameter should be -classpath C:\Pace\Tomcat\jakarta-tomcat-4.1.31\common\lib\servlet.jar $File Make adjustments for your file path to the servlet.jar.
Download - http://ws.apache.org/axis/download.cgi. Download the 1.1 binary zip distribution. Again, I would create a directory like C:\Pace\AXIS and unzip the file to that directory. Copy the ....\axis-1_1\webapps\axis directory to the webapps folder under your Tomcat installation (i.e. C:\Pace\Tomcat\jakarta-tomcat-4.1.31\webapps).
Install and setup - see http://ws.apache.org/axis/java/install.html#Introduction.
Download Xerces-J-bin.2.6.2.zip. Again, I would create a directory like C:\Pace\Xerces and unzip the file to that directory. Copy the .jar files into your axis/web-inf/lib directory.
Here is a list of the environment variables on my machine.
AXIS_HOME = C:\Pace\Tomcat\jakarta-tomcat-4.1.31\webapps\axis
AXIS_LIB = %AXIS_HOME%\WEB-INF\lib
AXISCLASSPATH = %AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;%AXIS_LIB%\commons-logging.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar;%AXIS_LIB%\wsdl4j.jar
CLASSPATH = .;%AXISCLASSPATH%;;C:\Pace\Tomcat\jakarta-tomcat-4.1.31\common\lib\servlet.jar
JAVA_HOME = C:\Pace\Java\AppServer\jdk
To your PATH variable which likely exists, add ;C:\Pace\Java\AppServer\jdk\bin
On pg 450, item 2, I created a .bat file to run this. See my lines of DOS commands below.
Axis Server | EPS Client |
To generate client stubs, here's an example. Make sure you have wsdl4j.jar in your classpath or specify it on the command line (java - cp ...).
java org.apache.axis.wsdl.WSDL2Java http://localhost:8080/axis/services/VendorAProcurement?wsdl
java org.apache.axis.wsdl.WSDL2Java http://localhost:8080/axis/services/VendorBProcurement?wsdl
java org.apache.axis.wsdl.WSDL2Java http://localhost:8080/axis/services/AltPartService?wsdl
cd /tomcat/bin - Change directories to Tomcat's bin directory
./startup.sh - Shutdown Tomcat
./shutdown.sh - Startup Tomcat
You may need to upload javaxrpc.jar to Tomcat/common/lib or Tomcat/webapps/epsdemo/WEB-INF/lib. Use SecureShell to do so.