Developing Web Services Server and Client Code using Apache Axis

org.apache.axis API

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
Abedi15001
Bays15002
Bhardwaj15003
Botadra15004
Brinza15005
Chen15006
Chevuru15007
Cho15008
Dhawan15009
Gopalan15010
Gupta15011
Bajpai-Jain15012
Jain15013
Jandhyala15014
Joshi15015
Le15016
Li15017
Metikurke15018
Pamplin15019
Pandya15020
Qiu15021
Rana15022
Rangaswamy15023
Sadanandan15024
Thakker15025
Viswanath15026
Yu15027
Please do not keep server running when you are done; You may kill the server with CTRL-C.