SOAP access problems

A

Alex Amat

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'
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top