Im trying to connect to a SOAP URL with a Ruby script.
I am following this Railscasts episode. I installed the savon gem(savon (2.4.0)).
Then in my ruby file I have this code:
require 'savon'
client = Savon.client(wsdl:"https://api.comscore.com/KeyMeasures.asmx?WSDL")
response = client.call(:authenticate , message: { username:"xxxxx", password:"xxxxx"})
puts "#{response.inspect}"
I know there is no issue with the url because I used SOAPUI and placed the WSDL URL there and I got back a response.
When I run the ruby file above I get the following exception:
/Users/XXXX/.rvm/gems/ruby-2.0.0-p247/gems/wasabi-3.2.3/lib/wasabi/resolver.rb:44:in `load_from_remote': Error: 401 (Wasabi::Resolver::HTTPError)
from /Users/XXXXX/.rvm/gems/ruby-2.0.0-p247/gems/wasabi-3.2.3/lib/wasabi/resolver.rb:32:in `resolve'
After googling about I saw this post, which seems to suggest that I should install and require gem "httpclient" which I did and then tried again. No changes, Still getting the same error.
Can someone give me a hand as to how to proceed .....
Thanks