From: Tadeusz Bochan Date: 2006-08-25T22:42:41+09:00 Subject: Help needed with soap/wsdlDriver Hi, Perhaps someone can tell me where I can get some help with the soap/wsdlDriver module ? I have posted my problem on this list before under the title SOAP/WSDL/BETFAIR (see below) but , responses have been scarce so far. Is this the correct list for such problems ? Regards, Tad Help Needed: SOAP/WSDL/BETFAIR Hi, I have been making a foray into the world of SOAP/WSDL etc and having been encouraged with the success of running the googleapi demo code, I thought I would have a go with Betfair. Alas, things are not going well, and I'm not sure if I'm doing something wrong or if the library module 'soap/wsdlDriver' is faulty or does not support the BFService.wsdl document. The login request sequence works great, but any other requests fail (eg., getAllEventTypes, logout) because the parameters do not get generated in the request document which is sent to Betfair, which seems to indicate a bug in soap/wsdlDriver.rb, or in the way I have setup the parameters. I have included the wiredumps for the 'login' and 'getAllEventTypes' requests as comments in the codefollowing, and you will see that the element for 'login' is formatted as per the parameters passed to login , but the one for 'getAllEventTypes' is empty. Any suggestions ? (I tried to debug the soap code, but it was all beyond my abilities) Regards, Tad # #http://bdphelp.betfair.com/API4/V1/API4.1aOnlineHelp/wwhelp/wwhimpl/js/html/wwhelp.htm # require 'soap/wsdlDriver' wsdl_url="https://api.betfair.com/betex-api-public-ws/v2/BFService.wsdl" puts ">>CONNECT<<" soap = SOAP::WSDLDriverFactory.new( wsdl_url ).create_rpc_driver soap.wiredump_file_base,soap.wiredump_dev = "bdp",STDOUT puts "------------------------------------------------" print ">>LOGIN<<" logindetails={:locationId =>0, :password =>"mypassword", :productId =>82, :username =>"myusername", :vendorSoftwareId=>0 } response=soap.login(:request=>logindetails) ; exit unless response.result.errorCode=="OK" # WIREDUMP OUTPUT FROM LOGIN REQUEST :- #- #- #- #- #- #- 0 #- mypassword #- 82 #- myusername #- 0 #- #- #- #- puts "------------------------------------------------" print ">>GET ALL EVENT TYPES<<" apiRequestHeader={:clientStamp => 0,:sessionToken => response.result.header.sessionToken} response=soap.getAllEventTypes(:request=>{:header=>apiRequestHeader,:locale=>"en"}) exit unless response.result.errorCode=="OK" # WIREDUMP OUTPUT FROM 'getAllEventTypes' REQUEST :- # # # # # # # # # puts "------------------------------------------------" print ">>LOGOUT<<" apiRequestHeader={:clientStamp => 0,:sessionToken => response.result.header.sessionToken} response=soap.logout(:request=>{:header=>apiRequestHeader}) p [response.result.header.errorCode,response.result.errorCode] exit unless response.result.errorCode=="OK" puts "------------------------------------------------" puts "It all worked OK" -- Posted via http://www.ruby-forum.com/.