CannedSoap
A rewrite version of the ruby2soap gem.
Motivation
The original gem has a lot of bugs and don't work on Linux environments. I started to maintain an old gem that uses this gem, so I started to maintain this gem too.
Getting Started
Add this line to your application's Gemfile:
gem 'canned_soap'
And then execute:
bundle install
Or if you don't use bundler:
gem install canned_soap
Usage
Initialize the client
client = CannedSoap::Client.new('http://www.webservicex.net/CurrencyConvertor.asmx')
Simple objects
client.ConversionRate(FromCurrency: 'ILS', ToCurrency: 'GBP')
Statefull
client.Init(userName: 'ericman93')
client.IncreaseScore() #the cookies saved automaticly
Complex type
client = CannedSoap::Client.new('http://localhost:1659/Service1.svc')
res = client.GetDataUsingDataContract(composite: {BoolValue: true, StringValue: "canedo_soap"})
Authentication
Available authentications
- NTLM
- Basic
- Digest
NTLM Auth
client.ConversionRate({:FromCurrency => 'ILS', :ToCurrency => 'GBP'},SecutryProtocol::NTLM,'user','password')
With domain
client.ConversionRate({:FromCurrency => 'ILS', :ToCurrency => 'GBP'},SecutryProtocol::NTLM,'user','password','domain')