Subject: | boolean type problem |
I just tracked down a problem with Net::Google to the value passed in a xsd:boolean element. Specifically, when a query is sent across with
<filter xsi:type="xsd:boolean">1</filter>
the Google API interprets that as False, as evidenced by a parameter in its response that indicates whether filtering was enabled. If the request contains
<filter xsi:type="xsd:boolean">true</filter>
then it takes it as being true.
Either Google is at fault or SOAP::Data i wrong for forcing truth to 1 instead of 'true'; I don't know which, so I sent this to the SOAP::Lite maintainer.
Either way, the way for Net::Google to workaround and get the right behavior is to change the code
SOAP::Data->type(boolean=>($self->filter()
? 1 : 0)),
in the _response() method and changing the above to
($self->filter ? 'true' : 'false')