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 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.