Hi,

The CONCRETE_TYPE_REQUIRED error occurred because you created an instance 
of the base class AdGroupCriterion, but the API expects one of the concrete 
implementations (BiddableAdGroupCriterion or NegativeAdGroupCriterion). If 
you change your example from:

AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
        operation.setOperand(criterion);
        operation.setOperator(operator);

to:

BiddableAdGroupCriterionOperation operation = new 
AdGroupCriterionOperation();
        operation.setOperand(criterion);
        operation.setOperator(operator);

then the ADD should succeed.

Cheers,
Josh, AdWords API Team

On Thursday, July 10, 2014 10:13:28 AM UTC-4, Dzmitry Zahusta wrote:
>
> Version of pom - 1.29.1, API - v201402, and I'm not using jaxws
>
> четверг, 10 июля 2014 г., 0:50:50 UTC+3 пользователь Josh Radcliff 
> (AdWords API Team) написал:
>>
>> Hi,
>>
>> Are you using jaxws by any chance? If so, this may be the same issue 
>> identified recently in github 20:
>>
>> https://github.com/googleads/googleads-java-lib/issues/20
>>
>> Also, could you let me know which *version* (v201309, v201402, or 
>> v201406) of the API you are using?
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Tuesday, July 8, 2014 10:23:03 AM UTC-4, Dzmitry Zahusta wrote:
>>>
>>> Would you be so kind to show your code? Because mine is not working - 
>>> I'm always getting CONCRETE_TYPE_REQUIRED error.
>>>
>>>         Vertical interest = new Vertical();
>>>         interest.setVerticalId(1252L);
>>>
>>>         AdGroupCriterion criterion = new AdGroupCriterion();
>>>
>>>         criterion.setAdGroupId(adGroupId);
>>>         criterion.setCriterion(interest);
>>>
>>>         AdGroupCriterionOperation operation = new 
>>> AdGroupCriterionOperation();
>>>         operation.setOperand(criterion);
>>>         operation.setOperator(operator);
>>>
>>>         AdGroupCriterionOperation[] operations = new 
>>> AdGroupCriterionOperation[] { operation };
>>>
>>>         // Execute mutate request.
>>>         AdGroupCriterionReturnValue result = 
>>> adGroupCriterionService.mutate(operations);
>>>
>>>
>>> пятница, 24 января 2014 г., 17:42:16 UTC+3 пользователь Josh Radcliff 
>>> (AdWords API Team) написал:
>>>>
>>>> Hi,
>>>>
>>>> Are you using one of our client libraries 
>>>> <https://developers.google.com/adwords/api/docs/clientlibraries> or 
>>>> are you generating the SOAP requests manually?  I just ran a check with 
>>>> the 
>>>> Java client library and was able to add a Vertical with verticalId 1252 to 
>>>> an ad group without any issues.  One possibility is that in the XML you're 
>>>> generating the *xsi:type* for the *Vertical* is set to *Criterion*, 
>>>> since the CONCRETE_TYPE_REQUIRED error is thrown when the type of the 
>>>> Criterion is the base (abstract) superclass Criterion.  The client library 
>>>> will take care of this for you automatically, but if you're generating the 
>>>> requests manually you'll have to set the type yourself.
>>>>
>>>> If that's not the source of the problem, could you post the request XML 
>>>> you are submitting?  Please make sure you remove any sensitive information 
>>>> such as clientId, clientSecret, refreshToken, etc.
>>>>
>>>> Thanks,
>>>> Josh, AdWords API Team
>>>>
>>>> On Friday, January 24, 2014 7:37:03 AM UTC-5, Andrew Ambrosio wrote:
>>>>>
>>>>> I noticed that we are using both Vertical.VerticalId and Vertical.Id, 
>>>>> thanks for pointing that out.
>>>>>
>>>>> I got a different error now. CONCRETE_TYPE_REQUIRED
>>>>>
>>>>> I am using "statistics" as vertical for this test. I give 1252 as 
>>>>> VerticalId.
>>>>>
>>>>> On Wednesday, January 22, 2014 2:50:21 AM UTC+8, Josh Radcliff 
>>>>> (AdWords API Team) wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Could you confirm that you are passing Vertical.VerticalId 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201309/AdGroupCriterionService.Vertical#verticalId>,
>>>>>>  
>>>>>> and *not *Vertical.Id 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201309/AdGroupCriterionService.Vertical#id>?
>>>>>>  
>>>>>>  The former should be set to the vertical ID from the list of available 
>>>>>> verticals.  The latter is automatically generated by AdWords when you 
>>>>>> create a new Vertical and should not be set in your mutate + ADD request.
>>>>>>
>>>>>> If that's not the issue, please pass along the vertical ID you are 
>>>>>> trying to use and I will attempt the same request on my side.
>>>>>>
>>>>>> Cheers,
>>>>>> Josh, AdWords API Team
>>>>>>
>>>>>> On Friday, January 17, 2014 2:17:06 AM UTC-5, Andrew Ambrosio wrote:
>>>>>>>
>>>>>>> I am trying to add a Vertical on an Ad Group using 
>>>>>>> AdGroupCriterionService.Mutate. As I give the Vertical.Id based on 
>>>>>>> the CSV provided 
>>>>>>> <https://developers.google.com/adwords/api/docs/appendix/verticals>by 
>>>>>>> AdWords. I got EntityNotFound.INVALID_ID on Partial Error.
>>>>>>>
>>>>>>> Can you guys assist me on using Vertical on Ad Groups?
>>>>>>>
>>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to