Tutorials
Jini Example
Jxta Example
Web Services
Related
Jxta
Jini
Web Services
For More Info
From P2P to Web Services and Grids: Peers in a Client/Server World
Ian J. Taylor, 2004
Publisher: Springer
ISBN: 1-85233-869-5
|
A Simple Web Service: Installation and Deployment
To install, write, delpoy and invoke a simple Web services perform the following sequence:
- Install a Web service hosting platform
- Write the Web service
- Deploy the Web service
- Invoke the Web service
and optionally
- Undeploy the Web service
Exercises
Try writing these Web services to practice on dealing with different data types and inputs/outputs:
- A Web service adder: extend our example above to take in two Java Integers and add them together, returning the result to the client.
- A Web service metric converter : write a metric converter that can take in a number in the first port and the identifier for conversion in the second port. The identifiers represent the type of conversion and can be one of the following types:
- CM_IN - Centimeters to inches - 1 centimeter equals 0.393701 Inches
- IN_CM - Inches to centimeters - 1 Inches equals 2.54 Centimeters
- KM_MI - kilometers to miles - 1 Kilometers equals 0.621371 Miles (statute)
- MI_KM - Miles to kilometers - 1 Miles (statute) equals 1.60934 Kilometers
The Web service returns the result to the client. To extend this example, you could write a simple interface for the client that allows the user to choose which conversion they would like to make.
|