If I add such line early in the script:

require_once 'Google/Api/Ads/AdWords/Util/v201605/ReportUtilsDelegate.php';

the XML will be parsed properly and I get ReportDownloadException. But if 
 I only define a version with:

/** @var \AdWordsUser $this->client */
$this->client->GetService('ReportDefinitionService', 'v201605');

and then later

(new \ReportUtils())->DownloadReport($reportDefinition, null, $this->client, 
$options);

Then I get ReflectionExcetion.



On Friday, December 23, 2016 at 3:21:20 PM UTC+1, Sebastian Piskorski wrote:
>
> If you run:
>
> (new \XmlDeserializer(\ReportUtilsDelegate::$CLASS_MAP))->
> ConvertXmlToObject($responseXml);
>
> with following XML:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <reportDownloadError><ApiError><type>
> AuthenticationError.OAUTH_TOKEN_INVALID</type><trigger>&lt;null&gt;
> </trigger><fieldPath></fieldPath></ApiError></reportDownloadError>
>
> which is response from AdWords API endpoint. Then it will throw:
>
> ReflectionException('Porperty  does not exist');
>
> Code is run by default when handling API response other than 200 
> at ReportUtilsDelegate.php line 164 and crashes at XmlDeserializer.php line 
> 144. 
>
> I'm using API v201605 .
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cef349a6-5dd4-4954-9a17-594d3351385e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Bug ... Sebastian Piskorski
    • ... Sebastian Piskorski
    • ... Sebastian Piskorski
      • ... 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum

Reply via email to