GetWeatherByZipCode - Moved to weather.gov

This section provides a tutorial example to show that the GetWeatherByZipCode Web service has been moved from webservicex.net to weather.gov.

After running the "Request 1" sample in the previous tutorial, look at the response window. You will see SOAP Fault message returned by webservicex.net:

<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>
  <soap:Fault>
   <soap:Code>
    <soap:Value>soap:Receiver</soap:Value>
   </soap:Code>
   <soap:Reason>
    <soap:Text xml:lang="en">
<![CDATA[System.Web.Services.Protocols.SoapException: 
Server was unable to process request. ---> System.Net.WebException: 
The request failed with the error message:
--
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href=
"http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php">here
</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at www.weather.gov Port 80
</address>
</body></html>
--.
 at System.Web.Services.Protocols.SoapHttpClientProtocol....
 at System.Web.Services.Protocols.SoapHttpClientProtocol....
 at WeatherService.www.nws.noaa.gov.ndfdXML.NDFDgen(Decimal ...
 at WeatherService.WeatherForecast.getData(Double latitude, ...
 at WeatherService.WeatherForecast.GetWeatherByZipCode(String ZipCode)
 --- End of inner exception stack trace ---]]></soap:Text>
   </soap:Reason>
   <soap:Detail/>
  </soap:Fault>
 </soap:Body>
</soap:Envelope>

The fault reason detail tells us that the GetWeatherByZipCode Web service has been moved to weather.gov.

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