Free Web Services - Herong's Tutorial Examples - Version 2.00, by Dr. Herong Yang

NDFDgenByDay - Response Message Sample

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

The response message of NDFDgenByDay Web service contains an XML document that provides weather forecast for the given location by days with temperature, probability of Precipitation, sky condition, and hazards condition.

After running the "Request 1" sample in the previous tutorial, look at the response window. You will see the response message of "NDFDgenByDay" in SOAP 1.1 format:

<SOAP-ENV:Envelope 
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <ns1:NDFDgenByDayResponse 
  xmlns:ns1="http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
   <dwmlByDayOut xsi:type="xsd:string"><![CDATA[<?xml version="1.0"?>
<dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:noNamespaceSchemaLocation=
 "http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">
  <head>
  <product srsName="WGS 1984" concise-name="dwmlByDay"
   operational-mode="official">
  <title>NOAA's National Weather Service Forecast by 12 Hour Period</title>
  <field>meteorological</field>
  <category>forecast</category>
  <creation-date refresh-frequency="PT1H">2015-08-22T23:35:07Z</creation-date>
  </product>
  <source>
  <more-information>http://www.nws.noaa.gov/forecasts/xml/
  </more-information>
  <production-center>Meteorological Development Laboratory
   <sub-center>Product Generation Branch</sub-center>
  </production-center>
  <disclaimer>http://www.nws.noaa.gov/disclaimer.html</disclaimer>
  <credit>http://www.weather.gov/</credit>
  <credit-logo>http://www.weather.gov/images/xml_logo.gif</credit-logo>
  <feedback>http://www.weather.gov/feedback.php</feedback>
  </source>
  </head>
  <data>
  <location>
  <location-key>point1</location-key>
  <point latitude="35.40" longitude="-97.60"/>
  </location>
  <moreWeatherInformation applicable-location="point1">
   http://forecast.weather.gov/MapClick.php?textField1=35.40&textField2=-97.60
  </moreWeatherInformation>
  <time-layout time-coordinate="local" summarization="12hourly">
  <layout-key>k-p24h-n3-1</layout-key>
  <start-valid-time period-name="Saturday">2015-08-22T06:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-22T18:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Sunday">2015-08-23T06:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-23T18:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Monday">2015-08-24T06:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-24T18:00:00-05:00</end-valid-time>
  </time-layout>
  ...
  <time-layout time-coordinate="local" summarization="12hourly">
  <layout-key>k-p3d-n1-4</layout-key>
  <start-valid-time>2015-08-21T18:00:00-05:00</start-valid-time>
  <end-valid-time>2015-08-24T18:00:00-05:00</end-valid-time>
  </time-layout>
  <parameters applicable-location="point1">
  <temperature type="maximum" units="Celsius" time-layout="k-p24h-n3-1">
    <name>Daily Maximum Temperature</name>
    <value>33</value>
    <value>31</value>
    <value>30</value>
  </temperature>
  <temperature type="minimum" units="Celsius" time-layout="k-p24h-n3-2">
    <name>Daily Minimum Temperature</name>
    <value>23</value>
    <value>22</value>
    <value>19</value>
  </temperature>
  <probability-of-precipitation type="12 hour" 
   units="percent" time-layout="k-p12h-n6-3">
    <name>12 Hourly Probability of Precipitation</name>
    <value>25</value>
    <value>7</value>
    <value>27</value>
    <value>25</value>
    <value>19</value>
    <value>16</value>
  </probability-of-precipitation>
  <weather time-layout="k-p12h-n6-3">
    <name>Weather Type, Coverage, and Intensity</name>
    <weather-conditions weather-summary="Chance Thunderstorms">
    <value coverage="chance" intensity="none" 
     weather-type="thunderstorms" qualifier="none"/>
    <value coverage="chance" intensity="light" 
     additive="and" weather-type="rain showers" qualifier="none"/>
    </weather-conditions>
    <weather-conditions weather-summary="Partly Sunny"/>
    <weather-conditions weather-summary="Chance Thunderstorms">
    <value coverage="chance" intensity="none" 
     weather-type="thunderstorms" qualifier="none"/>
    <value coverage="chance" intensity="light" 
     additive="and" weather-type="rain showers" qualifier="none"/>
    </weather-conditions>
    <weather-conditions weather-summary="Chance Thunderstorms">
    ...
    </weather-conditions>
  </weather>
  <conditions-icon type="forecast-NWS" time-layout="k-p12h-n6-3">
    <name>Conditions Icons</name>
    <icon-link>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg
    </icon-link>
    ...
  </conditions-icon>
  <hazards time-layout="k-p3d-n1-4">
    <name>Watches, Warnings, and Advisories</name>
    <hazard-conditions xsi:nil="true"/>
  </hazards>
  </parameters>
  </data>
</dwml>]]></dwmlByDayOut>
  </ns1:NDFDgenByDayResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The response tells us that the weather is going to be warm, 25 to 33 degrees Celsius, for the next 3 days and almost no chance of rain.

Click the "Raw" vertical tab. You will see the entire HTTP response including header lines:

HTTP/1.1 200 OK
Server: Apache/2.2.15 (Red Hat)
X-NIDS-ServerID: www5.mo
X-SOAP-Server: NuSOAP/0.9.5 (1.123)
Content-Encoding: gzip
Content-Length: 1682
Content-Type: text/xml; charset=ISO-8859-1
Vary: Accept-Encoding
Cache-Control: max-age=171
Expires: Tu, 22 Aug 2015 23:37:58 GMT
Date: Tue, 22 Aug 2015 23:35:07 GMT
Connection: keep-alive

(response XML...)

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

NDFDgenByDay - US Weather Forecast by Day

 NDFDgenByDay - Usage Description

 NDFDgenByDay - Request Message Sample

NDFDgenByDay - Response Message Sample

 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

 Printable Copy - PDF Version

NDFDgenByDay - Response Message Sample - Updated in 2015, by Dr. Herong Yang