18 lines
357 B
Ruby
18 lines
357 B
Ruby
|
require 'savon'
|
||
|
require 'pp'
|
||
|
|
||
|
WSDL = File.expand_path('./uszip.wsdl', File.dirname(__FILE__))
|
||
|
|
||
|
def main
|
||
|
#client = Savon.client('http://www.webservicex.net/uszip.asmx?WSDL')
|
||
|
client = Savon.client(WSDL)
|
||
|
response = client.request(:tns, :get_info_by_zip) do
|
||
|
soap.body = {"USZip" => 15220}
|
||
|
end
|
||
|
pp response.to_hash
|
||
|
end
|
||
|
|
||
|
if $0 == __FILE__
|
||
|
main
|
||
|
end
|