Skip to content

Instantly share code, notes, and snippets.

@stw
Created May 3, 2011 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stw/953289 to your computer and use it in GitHub Desktop.
Save stw/953289 to your computer and use it in GitHub Desktop.
Soap service test
#!/usr/bin/env ruby
require 'rubygems'
require 'savon'
require 'pp'
url = "http://www.xignite.com/xFinancials.asmx?WSDL"
client = Savon::Client.new(url)
response = client.request :get_other_ratios do
soap.env_namespace = ""
soap.element_form_default = false
soap.body = {
"Identifier" => "FCX",
"IdentifierType" => 'Symbol',
"ReportType" => 'Latest',
"AsOfDate" => "#{Time.now.month}/#{Time.now.day}/#{Time.now.year}"
}
end
pp response.to_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment