Hi All,

I'm trying to associate a UserList with an AdGroup through the
AdGroupCriterionService but am running into the CONCRETE_TYPE_REQUIRED
error which is described as:

"Concrete type of criterion (keyword v.s. placement) is required for
ADD and SET operations."

This isn't a keyword nor a placement so perhaps the documentation is
just bogus.  Full request & response is below.  I've messed around
with most combinations of setting & unsetting anything that has to do
with Type on both the Criterion and the AdGroupCriterion to no avail

Raw code example and xml logs to follow ... any help would be much
appreciated

Pete

CriterionUserList cul = new CriterionUserList();
cul.setUserListId( userList.getId() );
cul.setUserListName( userList.getName() );
cul.setType( CriterionType.USER_LIST );
cul.setCriterionType( CriterionType.USER_LIST.getValue() );

AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
adGroupCriterion.setAdGroupId( adGroupId );
adGroupCriterion.setCriterion( cul );
adGroupCriterion.setAdGroupCriterionType( CriterionType.USER_LIST.getValue() );

AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
operation.setOperator( Operator.ADD );
operation.setOperand( adGroupCriterion );

2012-02-15 15:54:04,967 DEBUG soap_xml  - <?xml version="1.0"
encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <soapenv:Header>
                <ns1:RequestHeader 
soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns:ns1="https://
adwords.google.com/api/adwords/cm/v201109">
                        <ns1:authToken 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/
v201109">******</ns1:authToken>
                        <ns1:clientCustomerId>******</ns1:clientCustomerId>
                        <ns1:developerToken>******</ns1:developerToken>
                        <ns1:userAgent>AdWords API Java Client Library - v8.4.2 
- ******</
ns1:userAgent>
                        <ns1:validateOnly>false</ns1:validateOnly>
                        <ns1:partialFailure>false</ns1:partialFailure>
                </ns1:RequestHeader>
        </soapenv:Header>
        <soapenv:Body>
                <mutate 
xmlns="https://adwords.google.com/api/adwords/cm/v201109";>
                        <operations>
                                <operator>ADD</operator>
                                <operand>
                                        <adGroupId>2674209638</adGroupId>
                                        <criterion 
xsi:type="ns2:CriterionUserList" xmlns:ns2="https://
adwords.google.com/api/adwords/cm/v201109">
                                                <type>USER_LIST</type>
                                                
<Criterion.Type>USER_LIST</Criterion.Type>
                                                <userListId>813278</userListId>
                                                <userListName>FIAT 
500c</userListName>
                                        </criterion>
                                        
<AdGroupCriterion.Type>USER_LIST</AdGroupCriterion.Type>
                                </operand>
                        </operations>
                </mutate>
        </soapenv:Body>
</soapenv:Envelope>

2012-02-15 15:54:04,983 DEBUG soap_xml  - <?xml version="1.0"
encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
        <soap:Header>
                <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
                        <requestId>0004b906e86322a00a34afc600007dd3</requestId>
                        <serviceName>AdGroupCriterionService</serviceName>
                        <methodName>mutate</methodName>
                        <operations>1</operations>
                        <responseTime>352</responseTime>
                        <units>15</units>
                </ResponseHeader>
        </soap:Header>
        <soap:Body>
                <soap:Fault>
                        <faultcode>soap:Server</faultcode>
                        
<faultstring>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @
operations[0].operand]</faultstring>
                        <detail>
                                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/
cm/v201109">
                                        
<message>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @
operations[0].operand]</message>
                                        
<ApplicationException.Type>ApiException</
ApplicationException.Type>
                                        <errors 
xsi:type="AdGroupCriterionError" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance">
                                                
<fieldPath>operations[0].operand</fieldPath>
                                                <trigger/>
                                                
<errorString>AdGroupCriterionError.CONCRETE_TYPE_REQUIRED</
errorString>
                                                
<ApiError.Type>AdGroupCriterionError</ApiError.Type>
                                                
<reason>CONCRETE_TYPE_REQUIRED</reason>
                                        </errors>
                                </ApiExceptionFault>
                        </detail>
                </soap:Fault>
        </soap:Body>
</soap:Envelope>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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

Reply via email to