GetWeatherByZipCode - Response Message Sample

This section provides a request message sample of GetWeatherByZipCode Web service.

The response message of GetWeatherByZipCode Web service contains weather forecast information for area represented by the specified ZIP code.

If you were running the example request in year 2011, you would get a response message of GetWeatherByZipCode in SOAP 1.2 returned with the weather forecast for the Death Valley park, ZIP code of 92328:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetWeatherByZipCodeResponse xmlns="http://www.webservicex.net">
         <GetWeatherByZipCodeResult>
            <Latitude>36.4671669</Latitude>
            <Longitude>116.893684</Longitude>
            <AllocationFactor>1.5E-05</AllocationFactor>
            <FipsCode>06</FipsCode>
            <PlaceName>DEATH VALLEY</PlaceName>
            <StateCode>CA</StateCode>
            <Details>
               <WeatherData>
                  <Day>Saturday, July 2, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
                  <MaxTemperatureF>114</MaxTemperatureF>
                  <MinTemperatureF>84</MinTemperatureF>
                  <MaxTemperatureC>46</MaxTemperatureC>
                  <MinTemperatureC>29</MinTemperatureC>
               </WeatherData>
               <WeatherData>
                  <Day>Sunday, July 3, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
                  <MaxTemperatureF>115</MaxTemperatureF>
                  <MinTemperatureF>84</MinTemperatureF>
                  <MaxTemperatureC>46</MaxTemperatureC>
                  <MinTemperatureC>29</MinTemperatureC>
               </WeatherData>
               <WeatherData>
                  <Day>Monday, July 4, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/skc.jpg</WeatherImage>
                  <MaxTemperatureF>113</MaxTemperatureF>
                  <MinTemperatureF>85</MinTemperatureF>
                  <MaxTemperatureC>45</MaxTemperatureC>
                  <MinTemperatureC>29</MinTemperatureC>
               </WeatherData>
               <WeatherData>
                  <Day>Tuesday, July 5, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/skc.jpg</WeatherImage>
                  <MaxTemperatureF>112</MaxTemperatureF>
                  <MinTemperatureF>85</MinTemperatureF>
                  <MaxTemperatureC>44</MaxTemperatureC>
                  <MinTemperatureC>29</MinTemperatureC>
               </WeatherData>
               <WeatherData>
                  <Day>Wednesday, July 6, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/skc.jpg</WeatherImage>
                  <MaxTemperatureF>111</MaxTemperatureF>
                  <MinTemperatureF>86</MinTemperatureF>
                  <MaxTemperatureC>44</MaxTemperatureC>
                  <MinTemperatureC>30</MinTemperatureC>
               </WeatherData>
               <WeatherData>
                  <Day>Thursday, July 23, 2011</Day>
                  <WeatherImage>
http://forecast.weather.gov/images/wtf/skc.jpg</WeatherImage>
                  <MaxTemperatureF>112</MaxTemperatureF>
                  <MinTemperatureF>87</MinTemperatureF>
                  <MaxTemperatureC>44</MaxTemperatureC>
                  <MinTemperatureC>31</MinTemperatureC>
               </WeatherData>
               <WeatherData/>
            </Details>
         </GetWeatherByZipCodeResult>
      </GetWeatherByZipCodeResponse>
   </soap:Body>
</soap:Envelope>

The response tells us that the Death Valley is a hot place in the summer. The image URL included in the response represents the type of weather for each day.

Last update: 2015.

Table of Contents

 About This Book

 SoapUI - Web Service Testing Tool

 SOAP Web Service and SoapUI

 REST Web Service and SoapUI

 GetCountries - Get All Countries and Territories

 GetCurrencies - Get Currencies from All Countries and Territories

 GetGMTbyCountry - Get GMT Information of a Given Country

 GetISD - Get ISD Phone Code of a Given Country

 GetCitiesByCountry - Get Cities by Country

 LatLonListCityNames - Return Latitudes and Longitudes of US Cities

 GetInfoByState - Get ZIP Codes of a Given US State

 GetAirportInformationByCountry - Get Airport Code by Country

 GetGeoIP - Get Country by IP Address

 ConvertTemp - Convert Temperature Unit

 ChangeLengthUnit - Convert Length Unit

 ConvertWeight - Convert Weight Unit

 ChangeAreaUnit - Convert Area Unit

 Code39 - Generate Bar Code Images in Code 39 Format

 GenerateBarCode - Generate Bar Code Images

 GetMortgagePayment - Calculate Mortgage Payment

 ConversionRate - Get Currency Exchange Rate

 GetQuote - Get Stock Quote

 getTime - Get the Current Time

 GetSunSetRiseTime - Get Sunrise and Sunset Time

GetWeatherByZipCode - Get Weather by ZIP Code in US

 GetWeatherByZipCode - Usage Description

 GetWeatherByZipCode - Request Message Sample

 GetWeatherByZipCode - Moved to weather.gov

GetWeatherByZipCode - Response Message Sample

 NDFDgenByDay - US Weather Forecast by Day

 NDFDgen - US-Weather Forecast for a Single Location

 questionSearch - Search Yahoo! Questions and Answers

 flickr.interestingness.getList - Get Interesting Photos

 Hotwire - Get Travel Ticker Deals

 Outdated Tutorials

 References

 PDF Printing Version