Need advise on connection refuse error

Hi.

My code is as follow:

···

##################
require 'http-access2'
require 'soap/rpc/driver'

url = "https://secure.mysite.co.uk:443/"
client = SOAP::RPC::Driver.new(url, ‘urn:mysite.co.uk:webservices’)
client.add_method(“hello_world”, “from”)
client.options[“protocol.http.ssl_config.verify_mode”] = nil
client.options[“protocol.http.basic_auth”] <<
[“https://secure.mysite.co.uk/",“myname”,"mypasswd”]
client.options[“client.http.proxy”] = “proxy.mysite.co.uk:8080

p client.hello_world("myname")
##################

I receive the following errors which appear to me that I've not set up my connection correctly. But I've still yet to understand more about the syntax and methods of calling in Ruby. Appreciate any advise please.

Also, I dont quite understand why do I need to specify the URL again at the client.options's basic_auth since I've already set it up when I create the new driver with the url. Is there a reason for the duplication? Million thanks to all help.

Exception 'Errno::ECONNREFUSED' at /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1283 - Connection refused - connect(2)
/usr/lib/ruby/site_ruby/1.8/http-access2.rb:836 - Connection refused - connect(2)
/usr/lib/ruby/1.8/soap/streamHandler.rb:245 - Connection refused - connect(2)
/usr/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 'initialize': Connection refused - connect(2) (Errno:ECONNREFUSED)
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 'new'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1283:in 'create_socket'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1252:in 'connect'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in 'timeout'
   from /usr/lib/ruby/1.8/timeout.rb:55:in 'timeout'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1251:in 'connect'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:1111:in 'query'
   from /usr/lib/ruby/site_ruby/1.8/http-access2.rb:833:in 'query'
    ... 7 levels...
   from /usr/lib/ruby/1.8/soap/rpc/proxy.rb:131:in 'call'
   from /usr/lib/ruby/1.8/soap/rpc/driver.rb:235:in 'call'
   from (eval):2:in 'hello_world'
   from myclient_test.rb:17

Hi,

client.options["client.http.proxy"] = "proxy.mysite.co.uk:8080"

It should be:

  client.options["client.http.proxy"] = "http://proxy.mysite.co.uk:8080"

or

  client.httpproxy = "http://proxy.mysite.co.uk:8080"

You need to add "http://" as an uri, at least for now.

I tend to think that http-access2 should raise an error when a
non-http URII has been specified as a proxy URI.

Regards,
// NaHi

···

On Sun, 19 Sep 2004 08:18:53 +0900, nkb <nkb@pacific.net.sg> wrote: