Skip to content

Instantly share code, notes, and snippets.

@temojin
Created March 25, 2011 05:42
Show Gist options
  • Save temojin/886409 to your computer and use it in GitHub Desktop.
Save temojin/886409 to your computer and use it in GitHub Desktop.
Non working savon SOAP request without WSDL
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
@temojin
Copy link
Author

temojin commented Mar 25, 2011

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 methodget_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

@temojin
Copy link
Author

temojin commented Mar 25, 2011

@rubiii
Copy link

rubiii commented Mar 25, 2011

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