Developing Web Services Server and Client Code using Apache Axis

Before you start on this assignment, you must copy ~raj/.cshrc file once again into your home directory. This contains new environmental variables that are required for using Apache Axis.

Developing Server Code and Deploying the Services

  1. cd ~/8711
  2. mkdir axis
  3. cd axis
  4. mkdir calc
  5. cd calc
  6. Write the Java Web Service; A sample Java class Calculator with two public methods add and subtract can be copied as: cp ~raj/axis/calc/Calculator.java .
  7. Compile the program: cd ..; javac calc/Calculator.java
  8. Write deployment file; Sample deployment file can be copied as: cp ~raj/axis/calc/deploy.wsdd calc/
  9. Run simple Axis server in a separate window:
    cd ~/8711/axis/
    java org.apache.axis.transport.http.SimpleAxisServer -p 15001
    Note: Please use the port assigned to you.
  10. Deploy the service:
    java org.apache.axis.client.AdminClient -p 15001 calc/deploy.wsdd
  11. Check if service is deployed:
    http://tinman.cs.gsu.edu:15001/axis/services/
    You should be able to see the service and the methods of the service and a link to the WSDL file of the service.

Developing Client Code

  1. cd ~/8711/axis
  2. Write client code; Sample client code can be copied as: cp ~raj/axis/calc/calcClient.java calc/
  3. Compile: javac calc/calcClient.java
  4. Run the client: java calc.calcClient -p 15001 add 4 5
    You should see result of 9.

Port Assignments
Ahmed15001
Chen15002
Dubuisson15003
He15004
Jung15005
Kalgaonkar15006
Liu15007
Mukker15008
Nguyen15009
Padhye15010
Panaganti15011
Supaneedis15012
Syeda15013
Vo15014
Yang15015
Zheng15016
Zhuang15017
Please do not keep server running when you are done; You may kill the server with CTRL-C.