Lesson 1.4: Implement the temperature conversion methods
Before you begin
About this task
Procedure
- In the Enterprise Explorer view, select ConvertTemperatureSoapBindingImpl.java under .
- Locate the fahrenheitToCelsius method and replace the current implementation with the following: return (fahrenheitValue - 32) / 9 * 5;
- Locate the celsiusToFahrenheit method
and replace the current implementation with the following: return
(celsiusValue * 9 / 5) + 32;
- Save your updates by clicking .
- Restart the EAR by expanding your server in the Servers view and right-clicking .
- In the Web Services Test Client, test your fahrenheitToCelsius and celsiusToFahrenheit methods.
Lesson checkpoint
Now you are ready to begin Lesson 1.5: Validate the web service traffic WS-I compliance.