I get the error like this :cvc-complex-type.2.4.d: Invalid content was found starting with element 'v:type'. No child element is expected at this point.

48 views
Skip to first unread message

jia zheng

unread,
May 28, 2018, 11:37:43 PM5/28/18
to AdWords API and Google Ads API Forum
I get the error like this :cvc-complex-type.2.4.d: Invalid content was found starting with element 'v:type'. No child element is expected at this point.
I send soap like this:
<v:mutate>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>64198701588</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:id>-1</v:id>
<v:partitionType>SUBDIVISION</v:partitionType>
</v:criterion>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>64198701588</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductType">
<v:value>mobile phones</v:value>
<v:type>PRODUCT_TYPE_L1</v:type>
</v:caseValue>
</v:criterion>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:NegativeAdGroupCriterion">
<v:adGroupId>64198701588</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductType"></v:caseValue>
</v:criterion>
</v:operand>
</v:operations>
</v:mutate>

how can i do?

jia zheng

unread,
May 29, 2018, 5:49:07 AM5/29/18
to AdWords API and Google Ads API Forum
<v:mutate>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>56493667635</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:id>-1</v:id>
<v:partitionType>SUBDIVISION</v:partitionType>
</v:criterion>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>56493667635</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType">
<v:type>PRODUCT_TYPE_L1</v:type>
<v:value>mobile phones</v:value>
</v:caseValue>
</v:criterion>
<v:biddingStrategyConfiguration>
<v:bids xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:CpcBid">
<v:bid>
<v:microAmount>100000</v:microAmount>
</v:bid>
</v:bids>
</v:biddingStrategyConfiguration>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:NegativeAdGroupCriterion">
<v:adGroupId>56493667635</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType"></v:caseValue>
</v:criterion>
</v:operand>
</v:operations>
</v:mutate>

Adjust the sort of type and value。reported the following error:[RequiredError.REQUIRED @ operations[2].operand.criterion.caseValue.type]

在 2018年5月29日星期二 UTC+8上午11:37:43,jia zheng写道:

Luis Xander Talag (AdWords API Team)

unread,
May 29, 2018, 5:59:38 AM5/29/18
to AdWords API and Google Ads API Forum
Hi Jia,

Based on your SOAP logs, you did not specify the fields under ProductType under the NegativeAdGroupCriterion which might have caused the error since the type field is a required field. Let me know if it works after doing my suggestion.

Thanks and regards,
Luis
AdWords API Team

jia zheng

unread,
May 29, 2018, 9:05:07 PM5/29/18
to AdWords API and Google Ads API Forum
Hi Luis Xander Talag,
Thank you very much for your suggestion. He is very good!

jia zheng

unread,
May 30, 2018, 4:51:45 AM5/30/18
to AdWords API and Google Ads API Forum
Hi,Luis,
I create a 2-level tree, he reported the same error, but the report id field,soap log like this:
<v:mutate>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>59537620921</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:id>-1</v:id>
<v:partitionType>SUBDIVISION</v:partitionType>
</v:criterion>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>59537620921</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>SUBDIVISION</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType">
<v:type>PRODUCT_TYPE_L1</v:type>
<v:value>mobile phones</v:value>
</v:caseValue>
<v:id>-2</v:id>
</v:criterion>
<v:biddingStrategyConfiguration>
<v:bids xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:CpcBid">
<v:bid>
<v:microAmount>100000</v:microAmount>
</v:bid>
</v:bids>
</v:biddingStrategyConfiguration>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:BiddableAdGroupCriterion">
<v:adGroupId>59537620921</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-2</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType">
<v:type>PRODUCT_TYPE_L2</v:type>
<v:value>Electronics</v:value>
</v:caseValue>
</v:criterion>
<v:biddingStrategyConfiguration>
<v:bids xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:CpcBid">
<v:bid>
<v:microAmount>100000</v:microAmount>
</v:bid>
</v:bids>
</v:biddingStrategyConfiguration>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:NegativeAdGroupCriterion">
<v:adGroupId>59537620921</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-1</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType">
<v:type>PRODUCT_TYPE_L1</v:type>
</v:caseValue>
</v:criterion>
</v:operand>
</v:operations>
<v:operations>
<v:operator>ADD</v:operator>
<v:operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns1:NegativeAdGroupCriterion">
<v:adGroupId>59537620921</v:adGroupId>
<v:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:ProductPartition">
<v:partitionType>UNIT</v:partitionType>
<v:parentCriterionId>-2</v:parentCriterionId>
<v:caseValue xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns3:ProductType">
<v:type>PRODUCT_TYPE_L2</v:type>
</v:caseValue>
</v:criterion>
</v:operand>
</v:operations>
</v:mutate>

在 2018年5月29日星期二 UTC+8下午5:59:38,Luis Xander Talag (AdWords API Team)写道:
Reply all
Reply to author
Forward
0 new messages