I have part of my rails 2 webservice application which is used as SOAP service (historical reasons, rest of app is REST).
Just two operations AddLead
and ShowLead
, with wsdl on /soap/wsdl
.
I want to test this operations by Rspec integrations tests.
Trying to use Savon gem (/spec/integration/soap_spec.rb
):
require "spec_helper"
require 'rubygems'
require 'savon'
describe "Leads" do
before(:all) do
wsdl= "http://localhost:3000/soap/wsdl"
wsdl = "http://www.example.com/soap/wsdl"
@client = Savon.client(:wsdl => wsdl )
puts("WSDL actions: #{@client.operations}")
end
end
But I can not find which URL I should use to point to WSDL.
URL localhost:3000
does not work, ending with error:
Errno::ECONNREFUSED in 'Leads before(:all)'
Connection could not be made, because target server it actively denied. - connect(2)
URL www.example.com
(which is output from test url helpers) does not work either, ending with error:
Wasabi::Resolver::HTTPError in 'Leads before(:all)'
Error: 302
Any ideas?
Foton