Hello Bharani,

Looks like you are trying to add negative keywords to the AdGroup. Instead 
you could use NegativeAdGroupCriterion 
<https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.NegativeAdGroupCriterion>
 on 
the AdGroupCriterion 
<https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.AdGroupCriterion>
 to 
add negative keywords to your AdGroups. You could also refer to the code 
sample AddKeywords.java 
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201809/basicoperations/AddKeywords.java#L175>.
 
Please let me know if you have any further questions.

Regards,
Sai Teja, AdWords API Team.

On Monday, November 5, 2018 at 4:50:07 AM UTC-5, Bharani wrote:
>
> I tried to add a negative Keywords using this example 
> <https://developers.google.com/adwords/api/docs/samples/java/targeting#add_customer_negative_criteria>.
>  
> I modified the placement to Keyword but then I get the following response.
> [02 Nov 2018 11:21:52,962-requestInfoLogger:WARN:main] Request made: 
> Service: CustomerNegativeCriterionService Method: mutate clientCustomerId: 
> CLIENT ID URL: 
> https://adwords.google.com/api/adwords/cm/v201806/CustomerNegativeCriterionService
>  
> Request ID: null ResponseTime(ms): null OperationsCount: null IsFault: true 
> FaultMessage: Unmarshalling Error: cvc-elt.4.2: Cannot resolve 
> 'ns2:Keyword' to a type definition for element 'criterion'. 
> [02 Nov 2018 11:21:52,980-soapXmlLogger:INFO:main] SOAP request:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <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 xmlns:ns1="
> https://adwords.google.com/api/adwords/cm/v201806"; 
> soapenv:mustUnderstand="0">
>             <ns1:clientCustomerId>CLIENT ID</ns1:clientCustomerId>
>             <ns1:developerToken>REDACTED</ns1:developerToken>
>             <ns1:userAgent>unknown (AwApi-Java, AdWords-Axis/3.15.0, 
> Common-Java/3.15.0, Axis/1.4, Java/1.8.0_121, jars)</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/v201806";>
>             <operations>
>                 <operator>ADD</operator>
>                 <operand>
>                     <criterion xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201806"; xsi:type="ns2:Keyword">
>                         <ns2:text>SAMPLE Keyword</ns2:text>
>                         <ns2:matchType>BROAD</ns2:matchType>
>                     </criterion>
>                 </operand>
>             </operations>
>         </mutate>
>     </soapenv:Body>
> </soapenv:Envelope>
>
> [02 Nov 2018 11:21:52,980-soapXmlLogger:INFO:main] SOAP response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>     <soap:Body>
>         <soap:Fault>
>             <faultcode>soap:Client</faultcode>
>             <faultstring>Unmarshalling Error: cvc-elt.4.2: Cannot resolve 
> 'ns2:Keyword' to a type definition for element 'criterion'. </faultstring>
>         </soap:Fault>
>     </soap:Body>
> </soap:Envelope>
>
> Request failed unexpectedly due to RemoteException: Unmarshalling Error: 
> cvc-elt.4.2: Cannot resolve 'ns2:Keyword' to a type definition for element 
> 'criterion'. 
>
>
> What Am I missing here?
>
> -
> Bharani
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/739b5551-6d18-40ad-a72b-d02013ee22ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Unable to add Negat... 'Bharani' via AdWords API and Google Ads API Forum
    • Re: Unable to ... 'Teja Makani' via AdWords API and Google Ads API Forum

Reply via email to