Using soap4r with digest authorization

8 views
Skip to first unread message

Hugo Estrada

unread,
May 14, 2009, 6:02:25 PM5/14/09
to soap4r
Hi, there,


I have adapted an example found on the soap4r site:

require "soap/wsdlDriver"
wsdl = "https://staging.common.virtualearth.net/find-30/common.asmx?
wsdl"

driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver

user = "hugo"
pass = "xxxxxxxxxxxx"
driver.options["protocol.http.auth"] << [wsdl,user,pass]


# Print the name of all lists (empty params = return all lists)
lists = driver.selectLists('','')
for list in lists
puts list.listName
end

This returns me an HTTPClient:BadREsponseError.

My question is, what do I have to do to get this working correctly?
It seems to be that the option to use auth never gets there; the code
seems to try to create a connection at the creation of the driver.

Is there a way to delay the connection? Or to set these values before
hand?

Thanks in advance,

Hugo

Boban Jovanoski

unread,
May 15, 2009, 3:02:45 AM5/15/09
to soa...@googlegroups.com
see the wiredump
driver.wiredump_dev = STDOUT
--
Boban Jovanoski
Software Engineer
Reply all
Reply to author
Forward
0 new messages