From: tsuraan Date: 2005-04-16T11:20:51+09:00 Subject: Re: soap4r and nws.noaa.gov (moving from ruby-core) >> Has anyone used soap4r with the US weather service's soap server? I'm >> having trouble figuring out how the array that the service uses should >> map into ruby. I've tried using wsdl2ruby to convert the wsdl >> automatically to a ruby class, but that doesn't even work. Also, if >> this is the wrong place to be asking this (probably...), could someone >> point me in the right direction? Thanks. > > Here's a sample client; > http://dev.ctor.org/soap4r/file/trunk/sample/wsdl/noaa/client.rb > The sample requires the latest snapshot tarball of soap4r at > http://dev.ctor.org/download/ > > I don't know this service well. The sample clients above seem to > access > the service correctly, but I don't know the response is right or not. > Would somebody please check this sample and let me know it works > correctly? The problem that I had was when I set various elements to false, the server would still send me all the data that it could. It's not really a problem, since ignoring unwanted data isn't painful, but it's annoying. I'd try the client out, but I'm waiting on a new motherboard for my dev machine. > I cannot understand the response XML. (What is dwml?) This > service seems to be somewhat popular... > > Is there a XML Schema of this dwml thing? I might be able to map a > response XML to Ruby object graph using XML Schema support of soap4r, > like I once did for Yahoo's Search Web Services at > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/132666 A somewhat useful description of the XML response can be found at http://weather.gov/mdl/XML/Design/MDL_XML_Design.pdf . I had something better, but I'm not sure where it is. A document containing the "NDFD XML Schema" is http://products.weather.gov/PDD/Extensible_Markup_Language.pdf (See appendix B), but I didn't find that to be very useful. Basically, if you understand the keys it's pretty easy to convert the XML response into something usable. I had it almost working, but then my motherboard flaked out and killed everything on my hard drive. Stupid computers... --jay