From: Ernie Date: 2004-07-15T04:47:20+09:00 Subject: Re: problem with soap4r Thanks, I'll give this a try. I'm running Windows XP and ruby 1.81. So I'll double check on the module. By the way, I have been getting this information via a simple form post to a web server runing a php script that ships the xml out in the same form. I don't know how long that service will run, so I thought I'd give SOAP a try. If NOAA continues the web service, it will probably be only SOAP. Thanks again. Ernie "NAKAMURA, Hiroshi" wrote in message news:40F522C7.1010607@keynauts.com... > Hi, > > Ernie wrote: > >>>require 'soap/wsdlDriver' > >>>weather = SOAP::WSDLDriverFactory.new( > >>> "http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" > >>>).create_driver > >>> > >>>This works ok and weather is created. > >>> > >>>My problem is how do I enter the parameters for the function call > >>>the parameters are: > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> The weatherParameters variable is an array of booleans eg. maxt, > > Try wsdl2ruby.rb which is included in soap4r/1.5.2. > > 0% wsdl2ruby.rb --wsdl ndfdXML.wsdl --classdef --force > I, [2004-07-14T21:02:19.761942 #224] INFO -- app: Creating class > definition. > I, [2004-07-14T21:02:19.762942 #224] INFO -- app: Creates file > 'default.rb'. > I, [2004-07-14T21:02:19.767942 #224] INFO -- app: End of app. (status: 0) > 0% cat default.rb > # http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/ndfdXML.xsd > class WeatherParametersType > @@schema_type = "weatherParametersType" > @@schema_ns = > "http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/ndfdXML.xsd" > > attr_accessor :maxt > [snip] > attr_accessor :icons > > def initialize(maxt = nil, mint = nil, temp = nil, dew = nil, pop12 = > nil, qpf = nil, sky = nil, snow = nil, wspd = nil, wdir = nil, wx = nil, > waveh = nil, icons = nil) > @maxt = maxt > [snip] > @icons = icons > end > end > > # http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/ndfdXML.xsd > module ProductType > Glance = "glance" > TimeSeries = "time-series" > end > 0% > > "moduel ProductType" might not be dumped under soap4r/1.5.2. Once you > install ruby's current CVS (or snapshot for 1.8.2), it will be dumped. > So, it should work. > > 0% ruby -rsoap/wsdlDriver -rdefault -e ' > now = Time.now > drv = > SOAP::WSDLDriverFactory.new("http://www.nws.noaa.gov/forecasts/xml/DWMLgen/w sdl/ndfdXML.wsdl").create_driver > drv.NDFDgen(123, 456, ProductType::Glance, now - 60, now, > WeatherParametersType.new) > ' > > ..though I don't know what is the meaning of each parameter. > > Just ignore "simpleType" warning untill 1.8.2 to be released. Sorry for > the inconvenience. > > Regards, > // NaHi > >