Forum: Ruby on Rails wsdlDriver won't run under Rails (SSL)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B4123acb616811390b55d8b0cefc9a3f?d=identicon&s=25 Fred Kaufman (fredkaufman)
on 2007-07-31 19:55
I have a wsdl client that will work standalone but as soon as I put
identical code into a Rails controller I get an Errno::ECONNREFUSED
#(Connection refused -connect(2)...)  Any ideas?

=======================
||Standalone: (works) ||
=======================
    require 'soap/wsdlDriver'
    require 'http-access2'

    user = 'fwkaufm'
    wsdl = 'ProxyUser.wsdl'

    soap = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
    soap.options['protocol.http.ssl_config.client_cert'] =
'/etc/certs/ssl.crt/server_cert.crt'
    soap.options['protocol.http.ssl_config.client_key']='/etc/certs/ssl.crt/server_key_nopass.pem'
    soap.options['protocol.http.ssl_config.ca_file']='/etc/certs/ssl.crt/ca.crt'

   dn = soap.getDn(user)
   puts dn

=======================================
||Behind a Controller: (Doesn't work) ||
=======================================
 require 'soap/wsdlDriver'
 require 'http-access2'

 class WebserviceTestController < ApplicationController
    def connection
      user = 'fwkaufm'
      wsdl = 'ProxyUser.wsdl'

      soap = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
      soap.options['protocol.http.ssl_config.client_cert'] =
'/etc/certs/ssl.crt/server_cert.crt'
      soap.options['protocol.http.ssl_config.client_key']='/etc/certs/ssl.crt/server_key_nopass.pem'
      soap.options['protocol.http.ssl_config.ca_file']='/etc/certs/ssl.crt/ca.crt'

      dn = soap.getDn(user)
      end
  end
This topic is locked and can not be replied to.