From: Gianfranco Cecconi Date: 2006-08-31T02:23:46+09:00 Subject: Re: SOAP/WSDL/BETFAIR Trying with the official (no development) Ruby 1.8.5 and the situation is much better now. I seem to login successfully, but I'm getting a "no session" error when logging out. Difficult to say if it is a Ruby issue now. Do you think we should move this thread somewhere else? It is also interesting that it doesn't work if I do not explicitly specify the URL for version 2 of the WSDL. The new source is the following: require 'soap/wsdlDriver' WSDL_URL = "https://api.betfair.com/betex-api-public-ws/v2/BFService.wsdl" BETFAIR_USERNAME = "********" BETFAIR_PASSWORD = "********" soapDriver = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver puts "Establishing connection to Betfair..." print "Logging in... " loginDetails = { :locationId => 0, :password => BETFAIR_PASSWORD, :productId => 82, :username => BETFAIR_USERNAME, :vendorSoftwareId => 0 } response = soapDriver.login(:request => loginDetails) ; exit unless response.result.errorCode == "OK" puts "succeded." print "Logging out... " apiRequestHeader = { :clientStamp => 0, :sessionToken => response.result.header.sessionToken } response = soapDriver.logout(:request => { :header => apiRequestHeader }) p [response.result.header.errorCode, response.result.errorCode] exit unless response.result.errorCode=="OK" puts "succeded." -- Posted via http://www.ruby-forum.com/.