[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"><?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/mdl/survey/pgb_survey/dev/DWMLgen/schema/DWML.xsd">
<latLonList>33.7885,-117.869</latLonList>
</dwml>
</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"><?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 24 Hour Period</title>
<field>meteorological</field>
<category>forecast</category>
<creation-date refresh-frequency="PT1H">2009-02-18T18:39:00Z</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="33.79" longitude="-117.87"/>
</location>
<moreWeatherInformation applicable-location="point1">http://forecast.weather.gov/MapClick.php?textField1=33.79&amp;textField2=-117.87</moreWeatherInformation>
<time-layout time-coordinate="local" summarization="24hourly">
<layout-key>k-p24h-n5-1</layout-key>
<start-valid-time>2009-02-18T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-19T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-19T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-20T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-20T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-21T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-21T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-22T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-22T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-23T06:00:00-08:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="12hourly">
<layout-key>k-p12h-n10-2</layout-key>
<start-valid-time>2009-02-18T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-18T18:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-18T18:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-19T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-19T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-19T18:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-19T18:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-20T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-20T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-20T18:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-20T18:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-21T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-21T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-21T18:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-21T18:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-22T06:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-22T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-22T18:00:00-08:00</end-valid-time>
<start-valid-time>2009-02-22T18:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-23T06:00:00-08:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="24hourly">
<layout-key>k-p5d-n1-3</layout-key>
<start-valid-time>2009-02-18T06:00:00-08:00</start-valid-time>
<end-valid-time>2009-02-23T06:00:00-08:00</end-valid-time>
</time-layout>
<parameters applicable-location="point1">
<temperature type="maximum" units="Fahrenheit" time-layout="k-p24h-n5-1">
<name>Daily Maximum Temperature</name>
<value>65</value>
<value>74</value>
<value>72</value>
<value>69</value>
<value>68</value>
</temperature>
<temperature type="minimum" units="Fahrenheit" time-layout="k-p24h-n5-1">
<name>Daily Minimum Temperature</name>
<value>48</value>
<value>52</value>
<value>51</value>
<value>54</value>
<value>54</value>
</temperature>
<probability-of-precipitation type="12 hour" units="percent" time-layout="k-p12h-n10-2">
<name>12 Hourly Probability of Precipitation</name>
<value>2</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>10</value>
<value>10</value>
<value>10</value>
</probability-of-precipitation>
<weather time-layout="k-p24h-n5-1">
<name>Weather Type, Coverage, and Intensity</name>
<weather-conditions weather-summary="Mostly Sunny"/>
<weather-conditions weather-summary="Mostly Sunny"/>
<weather-conditions weather-summary="Partly Cloudy"/>
<weather-conditions weather-summary="Mostly Cloudy"/>
<weather-conditions weather-summary="Patchy Fog">
<value coverage="patchy" intensity="none" weather-type="fog" qualifier="none"/>
</weather-conditions>
</weather>
<conditions-icon type="forecast-NWS" time-layout="k-p24h-n5-1">
<name>Conditions Icons</name>
<icon-link>http://www.nws.noaa.gov/weather/images/fcicons/few.jpg</icon-link>
<icon-link>http://www.nws.noaa.gov/weather/images/fcicons/few.jpg</icon-link>
<icon-link>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg</icon-link>
<icon-link>http://www.nws.noaa.gov/weather/images/fcicons/bkn.jpg</icon-link>
<icon-link>http://www.nws.noaa.gov/weather/images/fcicons/fg.jpg</icon-link>
</conditions-icon>
<hazards time-layout="k-p5d-n1-3">
<name>Watches, Warnings, and Advisories</name>
<hazard-conditions xsi:nil="true"/>
</hazards>
</parameters>
</data>
</dwml>
</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
-----------------------------------------------------------------------