![]() |
|
|||||||||||||||
|
||||||||||||||||
|
| IBM Weather Forecast Web services application | ||||
|
An IBM developerWorks Web services demo May 2002 Need a Web service that pulls live information from the Web? See the Weather Forecast demo and download the code, tools, and documentation. Then you can use these as the basis for your own application.
What is the Weather Forecast demo?
Run the demo Note:You'll need to have JavaScript enabled, and Internet Explorer 5.0 (or higher) or Netscape Communicator 4.5 (or higher).
Weather Forecast functions Note: The demo is case sensitive. State abbreviations should be capitalized (for example, CA for California) and the first letter of the city should be capitalized (for example, San Francisco). Also, only major US cities can be used for this demo. To see a list of cities for which weather forecasts are available, invoke the getCities method. For Arizona, for example, you get the following list:
Then invoke the getForecast method for Phoenix, for example:
The getState method is useful if you don't recall the two-letter abbreviation for a certain state.
Download the code and documentation Make sure your machines are connected to the internet, since the demo sends a request to the National Weather Service. It's also a good idea to read the Task topic, "Developing Web Services," and the Samples topic, "Tutorial: Creating a Web service from a Bean," in the online help for WebSphere Studio Application Developer. You can learn how to set up your environment and integrate an application with the the code and documentation which are located in this four part series, Web Services Development and Deployment with IBM Tools and Technologies, by Greg Flurry:
Prerequisites
|
||||||||||||
| About IBM | Privacy | Terms of use | Contact |