NetworkTarget google = new NetworkTarget();
google.setNetworkCoverageType(NetworkCoverageType.GOOGLE_SEARCH);
NetworkTarget search = new NetworkTarget();
search.setNetworkCoverageType(NetworkCoverageType.SEARCH_NETWORK);
NetworkTarget content = new NetworkTarget();
content.setNetworkCoverageType(NetworkCoverageType.CONTENT_NETWORK);
NetworkTarget contextual = new NetworkTarget();
contextual.setNetworkCoverageType
(NetworkCoverageType.CONTENT_CONTEXTUAL);
networkTarget.setTargets(new NetworkTarget[] { google, search,
content, contextual });
Receiving the error:
[TargetError.MULTIPLE_OCCURRENCES_OF_SAME_TARGET @ operations
[0].operand.targets[0]
Thanks!
-Joel
Do you have the SOAP XML logs for this request?
Best,
- Eric Koleda, AdWords API Team
But maybe you can help with the next error I encountered:
[TargetError.SEARCH_SUGGEST_NOT_AVAILABLE_FOR_THE_CUSTOMER @ operations
[0]/*CampaignId: (my campaign id)*/]
I don't even see this error listed here
http://code.google.com/apis/adwords/v2009/docs/reference/CampaignTargetService.TargetError.html
I am sending an empty list of network targets since according to the
documentation at http://code.google.com/apis/adwords/v2009/docs/reference/CampaignTargetService.NetworkTargetList.html
"List of network targets. An empty list means all networks are
targeted. This field must contain distinct elements. This field must
not contain null elements."
Here is the SOAP for this error.
<?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/v200909"><ns1:applicationToken>token</
ns1:applicationToken><ns1:authToken xmlns:ns1="https://
adwords.google.com/api/adwords/cm/v200909">******</
ns1:authToken><ns1:clientCustomerId>123456789</
ns1:clientCustomerId><ns1:developerToken>token</
ns1:developerToken><ns1:userAgent>AdWords API Java Client Library -
v6.2.0</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly></
ns1:RequestHeader></soapenv:Header><soapenv:Body><mutate
xmlns="https://adwords.google.com/api/adwords/cm/
v200909"><operations><operator>SET</operator><operand
xsi:type="ns2:NetworkTargetList" xmlns:ns2="https://adwords.google.com/
api/adwords/cm/v200909"><campaignId>123456789</campaignId></operand></
operations><operations><operator>SET</operator><operand
xsi:type="ns3:LanguageTargetList" xmlns:ns3="https://
adwords.google.com/api/adwords/cm/v200909"><campaignId>123456789</
campaignId><targets><languageCode>en</languageCode></targets></
operand></operations></mutate></soapenv:Body></soapenv:Envelope>
<?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/
v200909"><requestId>f1fb2666b896abfed2cb95cf57776827</
requestId><operations>1</operations><responseTime>455</
responseTime><units>1</units></ResponseHeader></
soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>
[TargetError.SEARCH_SUGGEST_NOT_AVAILABLE_FOR_THE_CUSTOMER @ operations
[0]/*CampaignId: 123456789*/]</faultstring><detail><ApiExceptionFault
xmlns="https://adwords.google.com/api/adwords/cm/v200909"><message>
[TargetError.SEARCH_SUGGEST_NOT_AVAILABLE_FOR_THE_CUSTOMER @ operations
[0]/*CampaignId: 123456789*/]</
message><ApplicationException.Type>ApiException</
ApplicationException.Type><errors xsi:type="TargetError"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"><fieldPath>operations[0]</fieldPath><trigger/
><ApiError.Type>TargetError</ApiError.Type></errors></
ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>
Thank you,
-Joel
On Dec 30, 10:41 am, AdWords API Advisor
I was able to replicate this error message on my own account, and I
have escalated the issue to the core engineering team. I'll update
this thread when I have more information. In the mean time, a
workaround would be to explicitly set the network targets to the
values you want.
Best,
- Eric
On Dec 30, 11:43 am, joel <joel.patt...@gmail.com> wrote:
> Never mind, a later section of the code was re-adding the same
> targets. The error was valid, my bad.
>
> But maybe you can help with the next error I encountered:
> [TargetError.SEARCH_SUGGEST_NOT_AVAILABLE_FOR_THE_CUSTOMER @ operations
> [0]/*CampaignId: (my campaign id)*/]
>
> I don't even see this error listed herehttp://code.google.com/apis/adwords/v2009/docs/reference/CampaignTarg...
>
> I am sending an empty list of network targets since according to the
> documentation athttp://code.google.com/apis/adwords/v2009/docs/reference/CampaignTarg...
> "List of network targets. An empty list means all networks are
> targeted. This field must contain distinct elements. This field must
> not contain null elements."
>
> Here is the SOAP for this error.
>
> <?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