Created
March 25, 2011 05:42
-
-
Save temojin/886409 to your computer and use it in GitHub Desktop.
Non working savon SOAP request without WSDL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'savon' | |
Savon.configure do |config| | |
config.log_level = :debug | |
end | |
client = Savon::Client.new do | |
wsdl.endpoint = "http://www.webservicex.net/globalweather.asmx" | |
wsdl.namespace = "http://www.webserviceX.NET" | |
end | |
client.get_cities_by_country! do |soap| | |
soap.action="GetCitiesByCountry" | |
soap.namespace="http://www.webserviceX.NET" | |
soap.input="GetCitiesByCountryRequest" | |
soap.body = { | |
:Country_name => "United States" | |
} | |
end |
was following this doc: https://github.com/rubiii/savon/wiki/wsdl
the documentation for savon >= v.0.8 can be found at: http://rubiii.github.com/savon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This just returns:
ruby test_soap_nowsdl.rb
~/.rvm/gems/ruby-1.8.7-p334@savontest/gems/savon-0.8.6/lib/savon/client.rb:153:in
send': undefined method
get_cities_by_country!' for main:Object (NoMethodError)~/.rvm/gems/ruby-1.8.7-p334@savontest/gems/savon-0.8.6/lib/savon/client.rb:153:in `method_missing'
from test_soap_nowsdl.rb:14