









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Libraries that make SOAP simpler
On 11/27/08, Matthew Bowie <niosop at gmail.com> wrote:
> Yeah, it's just another RPC lib, but one that has garnered pretty wide
> acceptance. In Python there's SOAPpy (works great), in PHP there's the
> built in SOAP stuff and *NuSOAP (http://nusoap.sourceforge.net/),
> http://search.cpan.org/~kbrown/SOAP-0.28/lib/SOAP.pm* for perl, and several
> including http://dev.ctor.org/soap4r for Ruby. A quick google search for
> "<insert language> soap library" should get you a lot of options.
Thanks, Matthew! (and everyone).
This Ruby 5-liner (example) is exactly what I wanted:
require 'soap/wsdlDriver'
wsdl_url = 'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl'
proxy = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
obj = proxy.LatLonListCityNames("1234")
print obj
Followup questions:
% What's the best mailing list for SOAP/etc newbies?
% http://www.programmableweb.com/apis lists many services that use
REST + other non-SOAP protocols? I assume similar Ruby
classes/modules exist for those?
% Is there a Ruby "metaclass" that recognizes whether something is
SOAP/REST/etc, and adapts accordingly?
% It seems "easy" to create a dynamic GUI for SOAP for a given
endpoint. First, a pulldown list of all methods available from an
endpoint. When you choose a method, you'd get fields for the
arguments, matching the argument type (eg, pulldown for list,
etc). Has anyone done this? Couldn't use static HTML (since the
arguments depend on the method), but DHTML might work (though I'd
prefer standalone Java or something).
% One ugliness w/ the code above. "obj" is just an ugly XML string
(which is what the API promises, so I can't complain too
much). However, this string is really in "DWML" format described at:
http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd
How do I really ruby "parse this string per the URL above + return an
object"?
% I want to try SOAP stuff myself, with a twist. Let's say I want to
return something that includes a city as part of the return
value. Instead of returning the city name/etc, I want to return a
geonames id and tell the client "fetch more info for the city from
geonames". Can I do that? Is that a "mash up"?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
|
|