RE: BatchJobService results can't be deserialized (PHP)

2019-01-23 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi Umer,

For better tracking of your concern. Could you create a brand new post on
your issue as this thread was an old post. We will assist you on the new
thread that you will create.

Regards,
Luis
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 01/23/19 16:10:27 umer.maj...@purelogics.net wrote:

Hi,

I want to create the same adgroup for multiple campaigns. e.g.
adgroup1 should be in campaign1, campaign2 and campaign3 as well.

Can anyone please guide me regarding this.

I got this error


On Thursday, January 21, 2016 at 7:14:02 PM UTC+5, Péter Gerő wrote:

Hi,

Our tool uses the PHP client lib. and even running the sample "
AddCompleteCampaignUsingBatchJob.php" an exception is thrown when there are
errors in the downloaded result set, so basically it cant process the
results.

I have traced it back to XmlDeserializer.php utility.
The error message says: "Property _parameterMap does not exist".

To be more specific when it tries to get the errorString property of a
child of ApiError class (ConvertElementToObject method last section), the
hasProperty() call returns false, then it tries to get the _parameterMap of
ApiError, which fails, and throws the above mentioned error.

Am I missing / have overlooked something here?

Thanks,

Peter Gerő

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/afe71908-1fdb-45db-87a1-17726f7d326d%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/ijlio49e6o0080ns7a005h4nu8w64mj2dpo6ko30c1g64o3ac1o%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJobService results can't be deserialized (PHP)

2016-03-02 Thread 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum
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 .
I put my file under v201601 

.

There was no errors thrown.


https://adwords.google.com/api/adwords/cm/v201601;>
...1


http://www.w3.org/2001/XMLSchema-instance; 
xsi:type="AdGroupServiceError">
operations[2].operand.name
Группа - 20160225

AdGroupServiceError.DUPLICATE_ADGROUP_NAME
AdGroupServiceError
DUPLICATE_ADGROUP_NAME


2

';

$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 = "
> https://adwords.google.com/api/adwords/cm/v201601;>
> ...0
> ...1
> 
> 
> http://www.w3.org/2001/XMLSchema-instance; 
> xsi:type="AdGroupServiceError">
> operations[2].operand.name
> Группа - 20160225
> 
> AdGroupServiceError.DUPLICATE_ADGROUP_NAME
> AdGroupServiceError
> DUPLICATE_ADGROUP_NAME
> 
> 
> 2
> 
> "
> 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.


Re: BatchJobService results can't be deserialized (PHP)

2016-03-01 Thread ukutok
Hi,

I have the same problem.
In BatchJob request I got result:
$xmlResponse = "
https://adwords.google.com/api/adwords/cm/v201601;>
...0
...1


http://www.w3.org/2001/XMLSchema-instance; 
xsi:type="AdGroupServiceError">
operations[2].operand.name
Группа - 20160225

AdGroupServiceError.DUPLICATE_ADGROUP_NAME
AdGroupServiceError
DUPLICATE_ADGROUP_NAME


2

"
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/a51e4385-3fcf-46a0-a422-61080147708b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BatchJobService results can't be deserialized (PHP)

2016-01-21 Thread Péter Gerő
Hi,

Our tool uses the PHP client lib. and even running the sample 
"AddCompleteCampaignUsingBatchJob.php" an exception is thrown when there 
are errors in the downloaded result set, so basically it cant process the 
results.

I have traced it back to XmlDeserializer.php utility. 
The error message says: "Property _parameterMap does not exist".

To be more specific when it tries to get the errorString property of a 
child of ApiError class (ConvertElementToObject method last section), the 
hasProperty() call returns false, then it tries to get the _parameterMap of 
ApiError, which fails, and throws the above mentioned error.

Am I missing / have overlooked something here?

Thanks,

Peter Gerő

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/44e1b011-1139-4eac-a88d-7a624649c1f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.