Developing Web Services Server and Client Code using Apache Axis
org.apache.axis API
Developing Server Code and Deploying the Services
- cd ~/8711
- mkdir axis
- cd axis
- mkdir calc
- cd calc
- 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 .
- Compile the program: cd ..; javac calc/Calculator.java
- Write deployment file; Sample deployment file can be copied as:
cp ~raj/axis/calc/deploy.wsdd calc/
- 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.
- Deploy the service:
java org.apache.axis.client.AdminClient -p 15001 calc/deploy.wsdd
- 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
- cd ~/8711/axis
- Write client code; Sample client code can be copied as:
cp ~raj/axis/calc/calcClient.java calc/
- Compile: javac calc/calcClient.java
- Run the client: java calc.calcClient -p 15001 add 4 5
You should see result of 9.
Port Assignments
Abedi | 15001 |
Bays | 15002 |
Bhardwaj | 15003 |
Botadra | 15004 |
Brinza | 15005 |
Chen | 15006 |
Chevuru | 15007 |
Cho | 15008 |
Dhawan | 15009 |
Gopalan | 15010 |
Gupta | 15011 |
Bajpai-Jain | 15012 |
Jain | 15013 |
Jandhyala | 15014 |
Joshi | 15015 |
Le | 15016 |
Li | 15017 |
Metikurke | 15018 |
Pamplin | 15019 |
Pandya | 15020 |
Qiu | 15021 |
Rana | 15022 |
Rangaswamy | 15023 |
Sadanandan | 15024 |
Thakker | 15025 |
Viswanath | 15026 |
Yu | 15027 |
Please do not keep server running when you are done; You may kill the server
with CTRL-C.