Java SOAP Webservice access from rails with the proxy

I am trying to access the Java SOAP webservice from rails. I need to
pass the username and password to access the webservice.

This is the code

require ‘soap/wsdlDriver’
soap_client = SOAP::WSDLDriverFactory.new(“http://urlofwebservice?wsdl”)
@driver = soap_client.create_rpc_driver
user = “admin”
pass = “xxxxx”
driver.options[“protocol.http.basic_auth”] << [wsdl,user,pass]

But i am getting the following

Unexpected response: #<HTTP::Message::Headers:0x67a54f8 @body_size=0,
@request_via_proxy=nil, @is_request=false, @response_status_code=401,
@body_charset=nil, @request_query=nil, @header_item=[[“Date”, “Wed, 21
Oct 2009 22:07:25 GMT”], [“Content-Type”, "text/xml;
charset=“utf-8"”], [“User-Agent”, “WSDL4R (/187, ruby 1.8.6
(2008-08-11) [i386-mswin32])”], [“Server”, “Forum Sentry”],
[“WWW-Authenticate”, "Basic realm=“HttpListenerPolicy-0"”],
[“Content-Length”, “615”]], @body_type=nil, @request_uri=nil,
@body_date=nil, @request_method=nil, @http_version=“1.1”,
@reason_phrase=“Unauthorized”, @chunked=false>

Please help me to resolve .

Thanks
Siva.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs