Skip to content

mlwyatt/savon

This branch is 53 commits behind savonrb/savon:main.

Folders and files

NameName
Last commit message
Last commit date
Sep 7, 2021
Nov 10, 2020
Sep 9, 2021
Sep 7, 2021
May 17, 2012
Jul 27, 2020
Nov 13, 2020
Sep 7, 2021
Apr 14, 2014
Feb 5, 2022
Apr 14, 2014
Oct 19, 2021

Repository files navigation

Savon

Heavy metal SOAP client

Documentation | Support | Mailing list | Twitter

Ruby Gem Version Code Climate Coverage Status

Version 2

Savon version 2 is available through Rubygems and can be installed via:

$ gem install savon

or add it to your Gemfile like this:

gem 'savon', '~> 2.12.0'

Usage example

require 'savon'

# create a client for the service
client = Savon.client(wsdl: 'http://service.example.com?wsdl')

# or: create a client with a wsdl provided as a string
client = Savon.client do |config|
  wsdl_content = File.read("/path/to/wsdl")
  config.wsdl wsdl_content
end

client.operations
# => [:find_user, :list_users]

# call the 'findUser' operation
response = client.call(:find_user, message: { id: 42 })

response.body
# => { find_user_response: { id: 42, name: 'Hoff' } }

For more examples, you should check out the integration tests.

Ruby version support

  • master - MRI 2.5, 2.6, 2.7 (same support as Ruby)
  • 2.12.x - MRI 2.2, 2.3, 2.4, 2.5
  • 2.11.x - MRI 2.0, 2.1, 2.2, and 2.3

If you are running MRI 1.8.7, try a 2.6.x release.

Running tests

$ bundle install
$ bundle exec rspec

FAQ

  • URI::InvalidURIError -- if you see this error, then it is likely that the http client you are using cannot parse the URI for your WSDL. Try gem install httpclient or add it to your Gemfile.

Documentation

Please be sure to read the documentation.

About

Heavy metal SOAP client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%