Hello Geno,

 After some trial and error involving different permutations of geo
targeting options, I discovered that the problem was not with the geo
targeting but rather with an inaccurate error message. The actual
problem with your request lies with the language targeting--you're
specifying 'en_US' as a <languages> value, but you really should just
provide 'en'. As the documentation for the languages code states at
the top of the page, it's the codes in the middle column of the table
that you should use for setting the language targeting of a campaign:

  
http://code.google.com/intl/en/apis/adwords/docs/developer/adwords_api_languages.html

 If you switch that over to 'en' I think you'll find everything works.
I'll see what I can do to get the core engineering team to change the
error message to something more accurate in this case.

Cheers,
-Jeff Posnick, AdWords API Team


On Jan 7, 3:04 pm, Geno <[email protected]> wrote:
> I'm getting an error "The given GeoTarget bean is not valid." when
> making requests to the sandbox.  Being that, GeoTargeting has had some
> changes in v13 is it possible that the sandbox is not up to date?
>
> Request:
>
> <?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:email soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next";
> soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/
> adwords/v13">REMOVED</ns1:email>
> <ns2:password soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns:ns2="https://adwords.google.com/
> api/adwords/v13">REMOVED</ns2:password>
> <ns3:user agent soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns:ns3="https://adwords.google.com/
> api/adwords/v13">REMOVED</ns3:useragent>
> <ns4:applicationToken soapenv:actor="http://schemas.xmlsoap.org/soap/
> actor/next" soapenv:mustUnderstand="0" xmlns:ns4="https://
> adwords.google.com/api/adwords/v13">REMOVED</ns4:applicationToken>
> <ns5:developerToken soap env:actor="http://schemas.xmlsoap.org/soap/
> actor/next" soapenv:mustUnderstand="0" xmlns:ns5="https://
> adwords.google.com/api/adwords/v13">REMOVED</ns5:developerToken>
> <ns6:clientEmail soapenv: actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns:ns6="https://adwords.google.com/
> api/adwords/v13">REMOVED</ns6:clientEmail>
> </soapenv:Header>
> <soapenv:Body>
> <addCampaignList xmlns="https://adwords.google.com/api/adwords/v13";>
> <campaigns>
> <budgetAmount>12080000</budgetAmount>
> <budgetOptimizerSettings>
> <bidCeiling>21500000</bidCeiling>
> <enabled>false</enabled>
> <takeOnOptimizedBids>false</takeOnOptimizedBids>
> </budgetOptimizerSettings>
> <budgetPeriod>Daily</budgetPeriod>
> <contentTargeting xsi:nil="true"/>
> <geoTargeting>
> <cityTargets/>
> <countryTargets/>
> <metroTargets>
> <metros>571</metros>
> </metroTargets>
> <regionTargets/>
> <targetAll>false</targetAll>
> </geoTargeting>
> <id>0</id>
> <languageTargeting>
> <languages>en_US</languages>
> </languageTargeting>
> <name>Test Case add campaign</name>
> <networkTargeting>
> <networkTypes>GoogleSearch</networkTypes>
> </networkTargeting>
> <schedule xsi:nil="true"/>
> <status>Active</status>
> </campaigns>
> </addCampaignList>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Response:
>
> <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>
>   <responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
> adwords/v13">48</responseTime>
>   <operations soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
> adwords/v13">1</operations>
>   <units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next";
> soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
> adwords/v13">1</units>
>   <requestId soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
> next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
> adwords/v13">b6643ef2bd1d5712920e268e5812625b</requestId>
>  </soapenv:Header>
>  <soapenv:Body>
>   <soapenv:Fault>
>      <faultcode>soapenv:Server.userException</faultcode>
>      <faultstring>One or more input elements failed validation.</
> faultstring>
>      <detail>
>       <ns1:fault xmlns:ns1="https://adwords.google.com/api/adwords/
> v13">
>        <ns1:code>122</ns1:code>
>        <ns1:message>One or more input elements failed validation.</
> ns1:message>
>        <ns1:errors>
>         <ns1:index>0</ns1:index>
>         <ns1:field>geoTargeting</ns1:field>
>         <ns1:code>29</ns1:code>
>         <ns1:isExemptable>false</ns1:isExemptable>
>         <ns1:detail>The given GeoTarget bean is not valid.</
> ns1:detail>
>      </ns1:errors>
>     </ns1:fault>
>    </detail>
>   </soapenv:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to