diff --git a/ruby-soap/uszip-client.rb b/ruby-soap/uszip-client.rb new file mode 100644 index 0000000..3baff0e --- /dev/null +++ b/ruby-soap/uszip-client.rb @@ -0,0 +1,17 @@ +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 diff --git a/ruby-soap/uszip.wsdl b/ruby-soap/uszip.wsdl new file mode 100644 index 0000000..8f644ef --- /dev/null +++ b/ruby-soap/uszip.wsdl @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Zip Code + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by City + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by state + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Area Code + + + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Zip Code + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by City + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by state + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Area Code + + + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Zip Code + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by City + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by state + + + + + Get State Code,City,Area Code,Time Zone,Zip Code by Area Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file