Assignment 1 - Due on Mar 8th 20th April 8th

Last modified

  1. Install and setup Apache Tomcat
  2. Download and setup Apache AXIS
  3. Download and setup Apache Xerces
  4. Run examples locally in Chap 12.
  5. Connect to Pace website via user accounts and run examples on server
  6. Provide a web page, index.html, (which you can store on Matrix under public_html) which should contain links to everything you have working on your Matrix account. You can then access your index.html page in a browser by either typing http://matrix.csis.pace.edu/~s04-is660g-s30/index.html or http://matrix.csis.pace.edu/~s04-is660g-s30/. Substitute your Matrix student account for s04-is660g-s30.

Note:  I will also look on the Pace server to ensure you've uploaded your results.

Professor's Solution Page -->  http://matrix.csis.pace.edu/~s05-is660g-s25/

Student Solutions

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

Technologies

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


Assistance - Tomcat

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.

Assistance - Java

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.

Assistance - Textpad

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.

Assistance AXIS - SOAP server

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.

Assistance Xerces

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. 

Assistance Environmental Variables

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

Assistance Chapter 12 Examples

On pg 450, item 2, I created a .bat file to run this.  See my lines of DOS commands below.

 

Assistance Code - Chap 12

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

 

Useful Unix Commands On Matrix

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.