-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Peter Aszkenasy wrote:
> Hi. I'm trying to use the Betfair API with Ruby:-
> http://bdp.betfair.com/exchdevelopers.php

> irb(main):034:0> apiRequestHeader = { :clientstamp => 0,:sessionToken =>
> bflogin.result.header.sessionToken }
> => {:clientstamp=>0,
> :sessionToken=>"MMrLImJigs0OO0u3K5gty8qSPIbwFaZwRyzzLnmOEjo="}

clientstamp => clientStamp

I don't think it causes the server error 'NO_SESSION' though.

> irb(main):035:0> events = bfsoap.getActiveEventTypes(:request =>
> {:header=>apiRequestHeader})

Please download the WSDL as a local file, then add the following change;

  <xsd:schema
    targetNamespace="http://www.betfair.com/publicapi/types/global/v3/">

=>

  <xsd:schema
    elementFormDefault="qualified"
    targetNamespace="http://www.betfair.com/publicapi/types/global/v3/">

(add "elementFormDefault" line)

And please try to use the WSDL to see how it goes?

- From example XML messages of the site, they seems to expect 'header'
element Namespace qualified but the WSDL does not define
'elementFormDefault' to 'qualified'.  I think it's just a bug of the
WSDL because the definition for targetNamespace
'http://www.betfair.com/publicapi/v3/BFGlobalService/' in the WSDL has
elementFormDefault='qualified'.

Regards,
// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRw18XB9L2jg5EEGlAQIBugf/Xh5060A6y8il9xewTOyEj4EXrCIDxDi9
kyhdLDJBLJEymY+WT1/bGH7e3LimsQTNn3wJwpnSKfTWaoTXcJLI6pYoVgPUcEsS
fk23godkL8lOv1J+DpPYGybXfCBWzLZgRgVNjCCjWKcRGgWuTc04pnxA3Gr3NMNg
1GAwclmER9OsTRs1/5ZbluG/fZPGO9egoBSUTECKOpdKPEqB53kazi0HTm+flbnM
nSwucDp2VBd/5X2NtsxUTUJw3RZSv+wWcIH8ugUsRWyvBpluSIAiHrbmvOxG19o5
ZYFLA/Js5zpsPFs+H+yE7CajaLU0C5ifwx9S9GyxlrU/ooDVYqHd5Q==
=Ksu6
-----END PGP SIGNATURE-----