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
Badgujar | 15001 |
Brannock | 15002 |
Damani | 15003 |
Desai | 15004 |
Deshmukh | 15005 |
Frederick | 15006 |
Galgali | 15007 |
Gupta | 15008 |
Hafner | 15009 |
Helton | 15010 |
Hiremath | 15011 |
Jullapelli | 15012 |
Karmakar | 15013 |
Mathialagan | 15014 |
Mohan | 15015 |
Mohanbabu | 15016 |
Naduvilvadukootu | 15017 |
Phoungphol | 15018 |
ReyazAhmed | 15019 |
Ribadeneira | 15020 |
Sethi | 15021 |
Shaik | 15022 |
Shen | 15023 |
Singh | 15024 |
Song | 15025 |
Srivrunyoo | 15026 |
Sun | 15027 |
Tran | 15028 |
Please do not keep server running when you are done; You may kill the server
with CTRL-C.