# SOAP access problems

**URL:** <https://www.ruby-forum.com/t/soap-access-problems/83488>\
**Category:** Ruby\
**Created:** [January 26, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/soap-access-problems/83488 "2007-01-26T15:58:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexamat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexamat](https://www.ruby-forum.com/u/alexamat)\
**Post date:** [January 26, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/soap-access-problems/83488/1 "2007-01-26T15:58:39Z")

</div>

Hi all

i have been trying to access a wsdl file that is password protected, if  
i do and http request like that:

wsdl\_url = ‘[http://localhost:8080/xplanner/soap/XPlanner?wsdl](http://localhost:8080/xplanner/soap/XPlanner?wsdl)’  
user = xxx  
pass = xxx

http = Net::HTTP.new(‘localhost’, 8080)  
http.start do |http|  
request = Net::HTTP::Get.new(‘/xplanner/soap/XPlanner?wsdl’)  
request.basic\_auth user, pass  
response = http.request(request)  
response.value  
puts @soap.inspect  
end

i can get to the wsdl, however if i call the file using the following  
code:

@soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver  
@soap.options[“protocol.http.basic\_auth”] \<\< [wsdl\_url, user, pass]

i get a 401 error

Any ideas of what I’m doing wrong ?

Thanks
