Hello Alexey,

I can't reproduce your issue.
One potential cause that I can think of now is the *ApiError* class may not 
be included or required properly.

The following is the code I tried mimicking your code using PHP client lib 
v8.0.0 <https://github.com/googleads/googleads-php-lib/releases/tag/8.0.0>.
I put my file under v201601 
<https://github.com/googleads/googleads-php-lib/tree/master/examples/AdWords/v201601>
.

There was no errors thrown.

<?php
require_once 'init.php';
require_once 'Google/Api/Ads/AdWords/Util/XmlDeserializer.php';
require_once 'Google/Api/Ads/AdWords/Util/v201601/BatchJobUtils.php';

$xmlResponse = '<?xml version="1.0" encoding="UTF-8"?>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201601";>
    <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>';

$deserializer = new XmlDeserializer(BatchJobUtils::$CLASS_MAP);
$mutateResponse = $deserializer->ConvertXmlToObject($xmlResponse);
var_dump($mutateResponse);

Could you please try on your side?
If you're still faced with the issue, could you please send your code 
snippet by *Reply privately to author* or attach it here (if it's not 
confidential)?

Best,
Thanet, AdWords API Team

On Tuesday, March 1, 2016 at 11:21:12 PM UTC+9, uku...@mail.ru wrote:
>
> 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.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscr...@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+unsubscr...@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/9b26ffbe-9a26-4833-8aeb-0594a7ef9103%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Batc... Péter Gerő
    • ... ukutok
      • ... 'Anthony Madrigal' via AdWords API Forum
      • ... 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum

Reply via email to