Trivial implementations of the fahrenheitToCelsius and celsiusToFahrenheit methods
were automatically generated when you created a Web service from your WSDL
document. In this section you will replace these trivial implementations with
more meaningful code, and perform the necessary steps to test your new methods.
- In the Project 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 WebSphere v6.1 Server in
the Servers view and right-clicking .
- Click from the main menu bar and
repeat the instructions from the previous section to test your fahrenheitToCelsius and celsiusToFahrenheit methods.