[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WEATHER example using HTTPAPI



   I have been using the example created by Scott to display the weather
   forecast on my signon screen.  This has worked great up until a few
   days ago.  I have always run the pgm in batch every morning.  Now, it
   ends abnormally with the following message:  Host name look up failed.
   If I run it interactively, the first time it fails with the same
   error.
   HTTPAPI Ver 1.23 released 2008-04-24
   OS/400 Ver V6R1M0
   New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
   ProtLoc=0
   http_persist_open(): entered
   http_long_ParseURL(): entered
   DNS resolver retrans: 2
   DNS resolver retry  : 2
   DNS resolver options: x'00000136'
   DNS default domain: WDS
   DNS server found: 10.0.10.3
   SetError() #2: Host name look up failed.
   Running it again immediately, it works with no problems.  Sometimes,
   when I run it a third time I get the same error above.  There does not
   seem to be any consistency.
   Another time, I log in, run the pgm interactively and it works fine.
   Immediately run it again, it ends with the same error above.
   Running IBM i 6.1 with latest cume and groups.
   Has anyone seen this?
   Thanks.
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V6R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: WDS
DNS server found: 10.0.10.3
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /forecasts/xml/SOAP_server/ndfdXMLserver.php HTTP/1.1
Host: www.weather.gov
User-Agent: http-api/1.23
Content-Type: text/xml
Expect: 100-continue
Content-Length: 489
SOAPAction: "http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode";


recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
<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://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";> <soapenv:Header/> <soapenv:Body> <ndf:LatLonListZipCode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";> <zipCodeList xsi:type="xsd:string">92868</zipCodeList> </ndf:LatLonListZipCode> </soapenv:Body> </soapenv:Envelope>
recvresp(): entered
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2009 18:38:57 GMT
Server: Apache
X-SOAP-Server: NuSOAP/0.7.2 (1.107)
Content-Length: 967
Cache-Control: max-age=7200
Expires: Wed, 18 Feb 2009 20:38:57 GMT
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/xml; charset=ISO-8859-1


SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 967
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="ISO-8859-1"?><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:LatLonListZipCodeResponse xmlns:ns1="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";><listLatLonOut xsi:type="xsd:string">&lt;?xml version=&apos;1.0&apos; ?&gt;
&lt;dwml version=&apos;1.0&apos; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;http://www.nws.noaa.gov/mdl/survey/pgb_survey/dev/DWMLgen/schema/DWML.xsd&quot;&gt;
&lt;latLonList&gt;33.7885,-117.869&lt;/latLonList&gt;
&lt;/dwml&gt;
</listLatLonOut></ns1:LatLonListZipCodeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
http_close(): entered
New XML iconv() objects set, xml_Remote=0. xml_Local=1208
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: WDS
DNS server found: 10.0.10.3
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /forecasts/xml/SOAP_server/ndfdXMLserver.php HTTP/1.1
Host: www.weather.gov
User-Agent: http-api/1.23
Content-Type: text/xml
Expect: 100-continue
Content-Length: 683
SOAPAction: "http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenByDay";


recvresp(): entered
SetError() #43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
<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://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";> <soapenv:Header/> <soapenv:Body> <ndf:NDFDgenByDay soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";> <latitude xsi:type="xsd:decimal">33.788499</latitude> <longitude xsi:type="xsd:decimal">-117.868999</longitude> <startDate xsi:type="xsd:date">2009-02-18</startDate> <numDays xsi:type="xsd:integer">5</numDays> <format xsi:type="xsd:string">24 hourly</format> </ndf:NDFDgenByDay> </soapenv:Body> </soapenv:Envelope>
recvresp(): entered
HTTP/1.1 100 Continue
Date: Wed, 18 Feb 2009 18:39:00 GMT
Via: 1.1 nws-hq-cache02 (NetCache NetApp/6.0.6)


SetError() #13: HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2009 18:38:59 GMT
Content-Length: 8468
Content-Type: text/xml; charset=ISO-8859-1
Expires: Wed, 18 Feb 2009 20:38:59 GMT
Cache-Control: max-age=7200
Server: Apache
X-SOAP-Server: NuSOAP/0.7.2 (1.107)
Vary: Accept-Encoding,User-Agent
Via: 1.1 nws-hq-cache02 (NetCache NetApp/6.0.6)


SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 8468
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="ISO-8859-1"?><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://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";><dwmlByDayOut xsi:type="xsd:string">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;dwml version=&quot;1.0&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd&quot;&gt;
  &lt;head&gt;
    &lt;product srsName=&quot;WGS 1984&quot; concise-name=&quot;dwmlByDay&quot; operational-mode=&quot;official&quot;&gt;
      &lt;title&gt;NOAA&apos;s National Weather Service Forecast by 24 Hour Period&lt;/title&gt;
      &lt;field&gt;meteorological&lt;/field&gt;
      &lt;category&gt;forecast&lt;/category&gt;
      &lt;creation-date refresh-frequency=&quot;PT1H&quot;&gt;2009-02-18T18:39:00Z&lt;/creation-date&gt;
    &lt;/product&gt;
    &lt;source&gt;
      &lt;more-information&gt;http://www.nws.noaa.gov/forecasts/xml/&lt;/more-information&gt;
      &lt;production-center&gt;Meteorological Development Laboratory&lt;sub-center&gt;Product Generation Branch&lt;/sub-center&gt;&lt;/production-center&gt;
      &lt;disclaimer&gt;http://www.nws.noaa.gov/disclaimer.html&lt;/disclaimer&gt;
      &lt;credit&gt;http://www.weather.gov/&lt;/credit&gt;
      &lt;credit-logo&gt;http://www.weather.gov/images/xml_logo.gif&lt;/credit-logo&gt;
      &lt;feedback&gt;http://www.weather.gov/feedback.php&lt;/feedback&gt;
    &lt;/source&gt;
  &lt;/head&gt;
  &lt;data&gt;
    &lt;location&gt;
      &lt;location-key&gt;point1&lt;/location-key&gt;
      &lt;point latitude=&quot;33.79&quot; longitude=&quot;-117.87&quot;/&gt;
    &lt;/location&gt;
    &lt;moreWeatherInformation applicable-location=&quot;point1&quot;&gt;http://forecast.weather.gov/MapClick.php?textField1=33.79&amp;amp;textField2=-117.87&lt;/moreWeatherInformation&gt;
    &lt;time-layout time-coordinate=&quot;local&quot; summarization=&quot;24hourly&quot;&gt;
      &lt;layout-key&gt;k-p24h-n5-1&lt;/layout-key&gt;
      &lt;start-valid-time&gt;2009-02-18T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-19T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-19T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-20T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-20T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-21T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-21T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-22T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-22T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-23T06:00:00-08:00&lt;/end-valid-time&gt;
    &lt;/time-layout&gt;
    &lt;time-layout time-coordinate=&quot;local&quot; summarization=&quot;12hourly&quot;&gt;
      &lt;layout-key&gt;k-p12h-n10-2&lt;/layout-key&gt;
      &lt;start-valid-time&gt;2009-02-18T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-18T18:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-18T18:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-19T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-19T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-19T18:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-19T18:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-20T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-20T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-20T18:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-20T18:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-21T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-21T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-21T18:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-21T18:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-22T06:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-22T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-22T18:00:00-08:00&lt;/end-valid-time&gt;
      &lt;start-valid-time&gt;2009-02-22T18:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-23T06:00:00-08:00&lt;/end-valid-time&gt;
    &lt;/time-layout&gt;
    &lt;time-layout time-coordinate=&quot;local&quot; summarization=&quot;24hourly&quot;&gt;
      &lt;layout-key&gt;k-p5d-n1-3&lt;/layout-key&gt;
      &lt;start-valid-time&gt;2009-02-18T06:00:00-08:00&lt;/start-valid-time&gt;
      &lt;end-valid-time&gt;2009-02-23T06:00:00-08:00&lt;/end-valid-time&gt;
    &lt;/time-layout&gt;
    &lt;parameters applicable-location=&quot;point1&quot;&gt;
      &lt;temperature type=&quot;maximum&quot; units=&quot;Fahrenheit&quot; time-layout=&quot;k-p24h-n5-1&quot;&gt;
        &lt;name&gt;Daily Maximum Temperature&lt;/name&gt;
        &lt;value&gt;65&lt;/value&gt;
        &lt;value&gt;74&lt;/value&gt;
        &lt;value&gt;72&lt;/value&gt;
        &lt;value&gt;69&lt;/value&gt;
        &lt;value&gt;68&lt;/value&gt;
      &lt;/temperature&gt;
      &lt;temperature type=&quot;minimum&quot; units=&quot;Fahrenheit&quot; time-layout=&quot;k-p24h-n5-1&quot;&gt;
        &lt;name&gt;Daily Minimum Temperature&lt;/name&gt;
        &lt;value&gt;48&lt;/value&gt;
        &lt;value&gt;52&lt;/value&gt;
        &lt;value&gt;51&lt;/value&gt;
        &lt;value&gt;54&lt;/value&gt;
        &lt;value&gt;54&lt;/value&gt;
      &lt;/temperature&gt;
      &lt;probability-of-precipitation type=&quot;12 hour&quot; units=&quot;percent&quot; time-layout=&quot;k-p12h-n10-2&quot;&gt;
        &lt;name&gt;12 Hourly Probability of Precipitation&lt;/name&gt;
        &lt;value&gt;2&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;0&lt;/value&gt;
        &lt;value&gt;10&lt;/value&gt;
        &lt;value&gt;10&lt;/value&gt;
        &lt;value&gt;10&lt;/value&gt;
      &lt;/probability-of-precipitation&gt;
      &lt;weather time-layout=&quot;k-p24h-n5-1&quot;&gt;
        &lt;name&gt;Weather Type, Coverage, and Intensity&lt;/name&gt;
        &lt;weather-conditions weather-summary=&quot;Mostly Sunny&quot;/&gt;
        &lt;weather-conditions weather-summary=&quot;Mostly Sunny&quot;/&gt;
        &lt;weather-conditions weather-summary=&quot;Partly Cloudy&quot;/&gt;
        &lt;weather-conditions weather-summary=&quot;Mostly Cloudy&quot;/&gt;
        &lt;weather-conditions weather-summary=&quot;Patchy Fog&quot;&gt;
          &lt;value coverage=&quot;patchy&quot; intensity=&quot;none&quot; weather-type=&quot;fog&quot; qualifier=&quot;none&quot;/&gt;
        &lt;/weather-conditions&gt;
      &lt;/weather&gt;
      &lt;conditions-icon type=&quot;forecast-NWS&quot; time-layout=&quot;k-p24h-n5-1&quot;&gt;
        &lt;name&gt;Conditions Icons&lt;/name&gt;
        &lt;icon-link&gt;http://www.nws.noaa.gov/weather/images/fcicons/few.jpg&lt;/icon-link&gt;
        &lt;icon-link&gt;http://www.nws.noaa.gov/weather/images/fcicons/few.jpg&lt;/icon-link&gt;
        &lt;icon-link&gt;http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg&lt;/icon-link&gt;
        &lt;icon-link&gt;http://www.nws.noaa.gov/weather/images/fcicons/bkn.jpg&lt;/icon-link&gt;
        &lt;icon-link&gt;http://www.nws.noaa.gov/weather/images/fcicons/fg.jpg&lt;/icon-link&gt;
      &lt;/conditions-icon&gt;
      &lt;hazards time-layout=&quot;k-p5d-n1-3&quot;&gt;
        &lt;name&gt;Watches, Warnings, and Advisories&lt;/name&gt;
        &lt;hazard-conditions xsi:nil=&quot;true&quot;/&gt;
      &lt;/hazards&gt;
    &lt;/parameters&gt;
  &lt;/data&gt;
&lt;/dwml&gt;
</dwmlByDayOut></ns1:NDFDgenByDayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
http_close(): entered
New XML iconv() objects set, xml_Remote=0. xml_Local=1208
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: WDS
DNS server found: 10.0.10.3
SetError() #2: Host name look up failed.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------