NDFDgen - Weather Forecast with Specific Parameters

This section provides a tutorial example on obtaining weather forecast with a list of specific weather parameters.

In the previous sections, we used the "glance" product type to obtain weather forecast with primary weather parameters. In this tutorial, we are going to use "time-series" product type to obtain weather forecast with specific weather parameters.

Here is the request message of NDFDgen to obtain a 3-day weather forecast data for the location at latitude of 35.4 and longitude of -97.6, Oklahoma City in Oklahoma state in US. The request asks the server to return weather forecast in 3 parameters: maxt - Maximium temperature, mint - Minimium temperaturem and sky - Sky condition.

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:ndf="http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
 <soapenv:Header/>
 <soapenv:Body>
  <ndf:NDFDgen 
   soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <latitude xsi:type="xsd:decimal">35.4</latitude>
   <longitude xsi:type="xsd:decimal">-97.6</longitude>
   <product xsi:type="dwml:productType" 
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    glance</product>
   <startTime xsi:type="xsd:dateTime">2015-08-22T00:00:00</startTime>
   <endTime xsi:type="xsd:dateTime">2015-08-25T00:00:00</endTime>
   <Unit xsi:type="dwml:unitType"  
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    m</Unit>
   <weatherParameters xsi:type="dwml:weatherParametersType" 
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    <maxt xsi:type="xsd:boolean">true</maxt>
    <mint xsi:type="xsd:boolean">true</mint>
    <sky xsi:type="xsd:boolean">true</sky>
   </weatherParameters>
  </ndf:NDFDgen>
 </soapenv:Body>
</soapenv:Envelope>

Here is the response message:

<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:NDFDgenResponse 
     xmlns:ns1="http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
   <dwmlOut 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="glance" 
   operational-mode="official">
  <title>NOAA's National Weather Service Forecast at a Glance</title>
  <field>meteorological</field>
  <category>forecast</category>
  <creation-date refresh-frequency="PT1H">2015-08-19T01:16:42Z
  </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="none">
  <layout-key>k-p24h-n3-1</layout-key>
  <start-valid-time period-name="Saturday">2015-08-22T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-22T20:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Sunday">2015-08-23T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-23T20:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Monday">2015-08-24T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2015-08-24T20: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-n4-2">
    <name>Daily Minimum Temperature</name>
    <value>23</value>
    <value>22</value>
    <value>19</value>
    <value>20</value>
  </temperature>
  <cloud-amount type="total" units="percent" time-layout="k-p6h-n13-3">
    <name>Cloud Cover Amount</name>
    <value>50</value>
    <value>26</value>
    <value>31</value>
    <value>52</value>
    <value>54</value>
    <value>58</value>
    <value>50</value>
    <value>53</value>
    <value>50</value>
    <value>50</value>
    <value>50</value>
    <value>30</value>
    <value>26</value>
  </cloud-amount>
  <weather time-layout="k-p6h-n13-3">
    <name>Weather Type, Coverage, and Intensity</name>
    <weather-conditions>
    <value coverage="chance" intensity="none" 
     weather-type="thunderstorms" qualifier="none">
    <visibility xsi:nil="true"/>
    </value>
    <value coverage="chance" intensity="light" 
     additive="and" weather-type="rain showers" qualifier="none">
    <visibility xsi:nil="true"/>
    </value>
    </weather-conditions>
    ...
  </weather>
  <conditions-icon type="forecast-NWS" time-layout="k-p6h-n13-3">
    <name>Conditions Icons</name>
    <icon-link>http://forecast.weather.gov/images/wtf/sct.jpg</icon-link>
    ...
  </conditions-icon>
  <hazards time-layout="k-p1h-n23-4">
    <name>Watches, Warnings, and Advisories</name>
    <hazard-conditions/>
    ...
  </hazards>
  </parameters>
  </data>
</dwml>]]></dwmlOut>
  </ns1:NDFDgenResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

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

NDFDgen - US-Weather Forecast for a Single Location

 NDFDgen - Usage Description

 NDFDgen - Request Message Sample

 NDFDgen - Response Message Sample

NDFDgen - Weather Forecast with Specific Parameters

 questionSearch - Search Yahoo! Questions and Answers

 flickr.interestingness.getList - Get Interesting Photos

 Hotwire - Get Travel Ticker Deals

 Outdated Tutorials

 References

 PDF Printing Version