"NAKAMURA, Hiroshi" <nahi / keynauts.com> wrote in message
news:40F7C0BE.9070507 / keynauts.com...
> Hi,
>
> Ernie wrote:
> > We're still having problems even with the 1.5.3 preview.  Thanks for
taking
> > all the time to work this through.  At least now the error message is
> > shorter. ; )
> > Haven't had a chance to look deeper into this problem on this end.
>
> Hmm.  I'm sorry but I'm off this weekend.  I'll back next Tuesday.
>
> The last try of this week.  rm -rf
> c:/ruby/lib/ruby/site_ruby/1.8/{soap,wsdl,xsd} and re-install
soap4r/1.5.3.
>
> See you next week.
>
> Regards,
> // NaHi
>
>
Your last suggestion did the trick.  wsdl2ruby worked fine and the code was
able to retrieve the weather forecast.  Something must have been hanging
around with the install over the existing 1_5_3 installation.  Thanks so
much for working through this with me.  Here are the steps and th code to
retireve one latitude and longitude coordinates for the next 7 days.

First retrieve the wsdl from NOAA at
http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
Save the wsdl as nfdXML.wsddl
then

C:\rubyscripts\sopaTest>> wsdl2ruby.rb --wsdl
ndfdXML.wsdl --classdef --force
This creates a default.rb file.

then run this code

require 'default.rb'
require 'soap/wsdlDriver'
t= Time.now
starter = Time.local(t.year,t.mon, t.day) + (24 *3600)
ender=starter + 7 * 24 *3600
lattitude=39.0
longitude=-77.0
params=WeatherParametersType.new(nil, nil, true, true,
nil,nil,nil,nil,nil,nil,nil,nil,nil)
drv =
SOAP::WSDLDriverFactory.new("http://www.nws.noaa.gov/forecasts/xml/DWMLgen/w
sdl/ndfdXML.wsdl").create_driver
ret=drv.NDFDgen(lattitude, longitude, ProductType::TimeSeries, starter,
ender, params)
File.open("forecast.xml","w"){|f| f.write(ret)}

This particular example retrieves temperature and dew point for the next 7
days.

Thanks again

Ernie