From: Scott Rubin Date: 2004-07-13T22:57:23+09:00 Subject: Re: problem with soap4r Ernie wrote: > I'm trying to write a client that fetches a weather forecast using soap4R. > > 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, mint, > others > > > sReceived=NDFDgen("What goes here"........) > > Any help would be appreciated. > > Ernie > > I started making a client for that service in Python. The only tricky part is the array of booleans. If my thinking is correct, a hashmap will work there. So do something like this. .... lattitude = 15.0 longitude = 15.0 product = "glance" startTime = "The time format they use, I forget" endTime = "The same" weatherParameters = { 'maxt' => true, 'mint' => false, .... } Response = NDFDgen( lattitude, longitude, product, startTime, endTime, weatherParameters ) If my thinking is correct this will work. If it doesn't, then the hashmap might not be correct. You may have to manually create a SOAP structure for the weather parameters. Let me know how it goes. The real trouble you will have is writing a parser for the response, it is in a very ugly format.