ruby - Savon raises error inside Rails app, but not inside irb -
i'm using savon library soap requests work. , i'm using same code within irb , rails application. when i'm running irb works should, rails generate error "no method 'to_hash' nil:nilclass" inside savon's do_request -> respond_with
methods.
here's code (the same when running within irb or rails):
# setup savon client soap requests client = savon::client.new "http://www.webservicex.net/country.asmx?wsdl" # test if "webservicex.net" server , running actions = client.wsdl.soap_actions raise "soap server down" if actions.nil? or actions.length <= 0 # country list resp = client.request :get_countries raise "no response countries" if resp.nil? resp = resp[:get_countries_response][:get_countries_result]
none of exceptions risen nor code far 'pinging server' executed.
what's wrong , how fix that?
it's problem httpi
gem - https://github.com/rubiii/savon/issues/163 use 0.9.1
version.
Comments
Post a Comment