Thankyou very very much - that works! Just for completeness I just
mentioned the commands I used to enable the gem soap4r module to work as
opposed to the built in earlier version version and also how to log in
and obtain the active markets
irb(main):001:0> require ‘rubygems’
=> false
irb(main):002:0> gem “soap4r”
=> true
irb(main):003:0> require “soap/wsdlDriver”
=> true
irb(main):004:0> wsdl = “BFGlobalService.wsdl”
=> “BFGlobalService.wsdl”
irb(main):005:0> drv =
SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
=>
#<SOAP::RPC::Driver:#SOAP::RPC::Proxy:https://api.betfair.com/global/v3/BFGlobalService>
logindetails={:locationId=>0,:password=>‘bfpasswd’,:username=>‘bfuser’,:productId=>82,:vendorSoftwareId=>0,:ipAddress=“82.69.38.122”}
=> {:locationId=>0, :username=>“bfuser”, :productId=>82,
:vendorSoftwareId=>0, :ipAddress=>“82.69.38.122”, :password=>“bfpasswd”}
irb(main):008:0> response= drv.login(:request=>logindetails)
=> #<SOAP::Mapping::Object:0x…fdbdec00a
{http://www.betfair.com/publicapi/v3/BFGlobalService/}Result=#<SOAP::Mapping::Object:0x…fdbdeb8da
{}header=#<SOAP::Mapping::Object:0x…fdbdeb56a {}errorCode=“OK”
{}minorErrorCode=“”
{}sessionToken=“r3k89g9Lu+tWRHlenQg7YwraNx/+Din5VPCXsn3r8=”
{}timestamp=“2007-10-11T14:42:14.600Z”> {}currency=“GBP”
{}errorCode=“OK” {}minorErrorCode=“”
{}validUntil=“0001-01-01T00:00:00.000Z”>>
irb(main):009:0> apiRequestHeader={:clientStamp => 0,:sessionToken
=>response.result.header.sessionToken}
=> {:clientStamp=>0,
:sessionToken=>“r3k89g9Lu+tWRHlenQg7YwraNx/+Din5VPCXsn3r8=”}
irb(main):010:0>
response=drv.getActiveEventTypes(:request=>{:header=>apiRequestHeader})
=> #<SOAP::Mapping::Object:0x…fdbd7e1e0
{http://www.betfair.com/publicapi/v3/BFGlobalService/}Result=#<SOAP::Mapping::Object:0x…fdbd7e154
{}header=#<SOAP::Mapping::Object:0x…fdbd7e0b4 {}errorCode=“OK”
{}minorErrorCode=“”
{}sessionToken=“TXr3k89g9Lu+tWRHlenQg7YwraNx/+Din5VPCXsn3r8=”
{}timestamp=“2007-10-11T14:43:44.088Z”>
{}eventTypeItems=#<SOAP::Mapping::Object:0x…fdbd7811e
{http://www.betfair.com/publicapi/types/global/v3/}EventType=[#<SOAP::Mapping::Object:0x…fdbd7809c
{}id=“6423” {}name=“American Football” {}nextMarketId=“0”
{}exchangeId=“0”>, #<SOAP::Mapping::Object:0x…fdbd71ad0 {}id=“61420”
{}name=“Australian Rules” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd71184 {}id=“7511” {}name=“Baseball”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd6dbba {}id=“7522” {}name=“Basketball”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd69182 {}id=“6” {}name=“Boxing”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd663e2 {}id=“982477” {}name=“Bridge”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd645e2 {}id=“4968929” {}name=“Combat
Sports” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd6189c {}id=“4” {}name=“Cricket”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd5c3ba {}id=“11” {}name=“Cycling”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd58210 {}id=“3503” {}name=“Darts”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd55100 {}id=“6231” {}name=“Financial
Bets” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd52b44 {}id=“2152880” {}name=“Gaelic
Games” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd4d2f2 {}id=“3” {}name=“Golf”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd463da {}id=“4339” {}name=“Greyhound
Racing” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd3d5be {}id=“15” {}name=“Greyhound -
Todays Card” {}nextMarketId=“20629641” {}exchangeId=“1”>,
#<SOAP::Mapping::Object:0x…fdbd38b68 {}id=“468328” {}name=“Handball”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd34eb4 {}id=“7” {}name=“Horse Racing”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd2fa22 {}id=“13” {}name=“Horse Racing -
Todays Card” {}nextMarketId=“20628919” {}exchangeId=“1”>,
#<SOAP::Mapping::Object:0x…fdbd2b1d4 {}id=“7524” {}name=“Ice Hockey”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd26544 {}id=“8” {}name=“Motor Sport”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd2108a {}id=“5412697” {}name=“Pelota”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd1c904 {}id=“315220” {}name=“P0ker”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd18228 {}id=“2378961” {}name=“Politics”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd12436 {}id=“1477” {}name=“Rugby League”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd0bb36 {}id=“5” {}name=“Rugby Union”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd0633e {}id=“6422” {}name=“Snooker”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbd017b2 {}id=“1” {}name=“Soccer”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbcfec1a {}id=“14” {}name=“Soccer -
Fixtures” {}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbcfab10 {}id=“10” {}name=“Special Bets”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbcf4f30 {}id=“2” {}name=“Tennis”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbcf053e {}id=“998917” {}name=“Volleyball”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbcec7fe {}id=“2901849” {}name=“Water Polo”
{}nextMarketId=“0” {}exchangeId=“0”>,
#<SOAP::Mapping::Object:0x…fdbce701a {}id=“451485” {}name=“Winter
Sports” {}nextMarketId=“0” {}exchangeId=“0”>]> {}minorErrorCode=“”
{}errorCode=“OK”>>
irb(main):011:0>