< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
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:
> <part name="latitude" type="xsd:decimal" />
> <part name="longitude" type="xsd:decimal" />
> <part name="product" type="typens:productType" />
> <part name="startTime" type="xsd:dateTime" />
> <part name="endTime" type="xsd:dateTime" />
> <part name="weatherParameters" type="typens:weatherParametersType" />
>
> 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.