ruby-on-railsrubyhttphttp-authenticationsoap4r

How to use SOAP::RPC::Driver with basic http authentication with SOAP4r


I am generating the stubs in runtime with driver=SOAP::RPC::Driver.new wsdl_path. How should I initialize/configure the driver in order to use http basic authentication? I have tried driver.options["protocol.http.basic_auth"] = [endpoint_url,'username','password']], though, it fails...

Does anyone know how to do this?


Solution

  • I should have tried to use the driver.options['protocol.http.basic_auth]#<< method instead of #=. it works with #<<