From: "NAKAMURA, Hiroshi" Date: 2004-07-20T17:16:03+09:00 Subject: Re: still having problems with soap4R Hi, Ernie wrote: > Your last suggestion did the trick. wsdl2ruby worked fine and the code was > able to retrieve the weather forecast. Good. This kind of installation problem can happen when ruby/1.8.2 (and WindowsInstaller of it) released. Check lib/ruby/site_ruby/1.8 dir synchronized with lib/ruby/1.8 dir. (For safe upgrade, remove site_ruby dir before installing new ruby). > 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. You can create client driver files here as follows; % wsdl2ruby.rb --wsdl http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl --type client --force I, [2004-07-20T17:00:28.493174 #3356] INFO -- app: Creating class definition. I, [2004-07-20T17:00:28.494174 #3356] INFO -- app: Creates file 'default.rb'. I, [2004-07-20T17:00:28.506174 #3356] INFO -- app: Creating driver. I, [2004-07-20T17:00:28.506174 #3356] INFO -- app: Creates file 'defaultDriver.rb'. I, [2004-07-20T17:00:28.514174 #3356] INFO -- app: Creating client skelton. I, [2004-07-20T17:00:28.514174 #3356] INFO -- app: Creates file 'ndfdXMLClient.rb'. I, [2004-07-20T17:00:28.516174 #3356] INFO -- app: End of app. (status: 0) See the file "ndfdXMLClient.rb" generated and just modify it as follows. #!/usr/bin/env ruby require 'defaultDriver.rb' endpoint_url = ARGV.shift obj = NdfdXMLPortType.new(endpoint_url) t = Time.now startTime = Time.local(t.year,t.mon, t.day) + (24 *3600) endTime = startTime + 7 * 24 *3600 latitude = 39.0 longitude = -77.0 product = ProductType::TimeSeries weatherParameters = WeatherParametersType.new(nil, nil, true, true, nil,nil,nil,nil,nil,nil,nil,nil,nil) puts obj.nDFDgen(latitude, longitude, product, startTime, endTime, weatherParameters) This must work as your sample. This sample does not retrieve and parse the WSDL file at runtime so it's faster than wsdlDriver.rb. But retrieving WSDL each time can easily follows server endpoint change. Just an option. Regards, // NaHi