Hi,
I have the same problem.
In BatchJob request I got result:
$xmlResponse = "<?xml version="1.0" encoding="UTF-8"?>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601">
<rval><result>...</result><index>0</index></rval>
<rval><result>...</result><index>1</index></rval>
<rval>
<errorList>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AdGroupServiceError">
<fieldPath>operations[2].operand.name</fieldPath>
<trigger>Группа - 20160225</trigger>
<errorString>AdGroupServiceError.DUPLICATE_ADGROUP_NAME</errorString>
<ApiError.Type>AdGroupServiceError</ApiError.Type>
<reason>DUPLICATE_ADGROUP_NAME</reason>
</errors>
</errorList>
<index>2</index>
</rval>
</mutateResponse>"
Then I try to deserialize it:
$deserializer = new XmlDeserializer(BatchJobUtils::$CLASS_MAP);
try{
$mutateResponse = $deserializer->ConvertXmlToObject($xmlResponse);
}
catch(Exception $e){
$this->eHandler->MyExit(' GetResult/intro ', true, $e);
}
and got:
System: Property _parameterMap does not exist
The problem appear in src\Google\Api\Ads\AdWords\Util\XmlDeserializer.php in line 127
$parameterMapProp = $parentClass->getProperty('_parameterMap');
my experiments show:
1. $elementClass is AdGroupServiceError. It has properties:
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
$this->ApiErrorType = $ApiErrorType;
2. $parentClass is ApiError. It has prorerties:
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
$this->ApiErrorType = $ApiErrorType;
3. When I call
$elementClass->hasProperty($name) where
$name = 'reason' ||
$name = 'fieldPath' ||
$name = 'trigger'
result is true
When
$name = 'errorString' ||
$name = 'ApiErrorType'
result is false
4. Class ApiError has property '_parameterMap', but
$parameterMapProp = $parentClass->getProperty('_parameterMap'); gives error.
I can't understand, why. I think, it's some mistake in API, but can't localize one.
Dolganov Alexey.
-- I have the same problem.
In BatchJob request I got result:
$xmlResponse = "<?xml version="1.0" encoding="UTF-8"?>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601">
<rval><result>...</result><index>0</index></rval>
<rval><result>...</result><index>1</index></rval>
<rval>
<errorList>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AdGroupServiceError">
<fieldPath>operations[2].operand.name</fieldPath>
<trigger>Группа - 20160225</trigger>
<errorString>AdGroupServiceError.DUPLICATE_ADGROUP_NAME</errorString>
<ApiError.Type>AdGroupServiceError</ApiError.Type>
<reason>DUPLICATE_ADGROUP_NAME</reason>
</errors>
</errorList>
<index>2</index>
</rval>
</mutateResponse>"
Then I try to deserialize it:
$deserializer = new XmlDeserializer(BatchJobUtils::$CLASS_MAP);
try{
$mutateResponse = $deserializer->ConvertXmlToObject($xmlResponse);
}
catch(Exception $e){
$this->eHandler->MyExit(' GetResult/intro ', true, $e);
}
and got:
System: Property _parameterMap does not exist
The problem appear in src\Google\Api\Ads\AdWords\Util\XmlDeserializer.php in line 127
$parameterMapProp = $parentClass->getProperty('_parameterMap');
my experiments show:
1. $elementClass is AdGroupServiceError. It has properties:
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
$this->ApiErrorType = $ApiErrorType;
2. $parentClass is ApiError. It has prorerties:
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
$this->ApiErrorType = $ApiErrorType;
3. When I call
$elementClass->hasProperty($name) where
$name = 'reason' ||
$name = 'fieldPath' ||
$name = 'trigger'
result is true
When
$name = 'errorString' ||
$name = 'ApiErrorType'
result is false
4. Class ApiError has property '_parameterMap', but
$parameterMapProp = $parentClass->getProperty('_parameterMap'); gives error.
I can't understand, why. I think, it's some mistake in API, but can't localize one.
Dolganov Alexey.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 adwords-api+unsubscribe@googlegroups.com.
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/a51e4385-3fcf-46a0-a422-61080147708b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment