Hello Gordon,

 Yes, I'd recommend either dropping the blank arrays or making sure
that you list the blank targeting elements in the array in the same
order in which they're defined in the WSDL (a snippet of which was
posted up-thread).

Cheers,
-Jeff Posnick, AdWords API Team


On Feb 26, 4:42 am, Gordon <[email protected]> wrote:
> Hi Jeff
>
> I have been looking into my code this morning, and I have a copy of an
> array with a countryTarget set, and an array with a proximityTarget
> set.
>
> For each level of targeting - if it is used then a value is passed in,
> eg: in the campaigns that we build not using a proximityTarget we
> would only set a countryTarget but we would also set a blank array for
> each other level of targeting.  This is what we would pass in to
> addCampaign() when only country targeting is required:
>
> Array
> (
>     [countryTargets] => Array
>         (
>             [countries] => Array
>                 (
>                     [0] => GB
>                 )
>
>             [excludedCountries] => Array
>                 (
>                 )
>
>         )
>
>     [regionTargets] => Array
>         (
>             [regions] => Array
>                 (
>                 )
>
>             [excludedRegions] => Array
>                 (
>                 )
>
>         )
>
>     [metroTargets] => Array
>         (
>             [metros] => Array
>                 (
>                 )
>
>             [excludedMetros] => Array
>                 (
>                 )
>
>         )
>
>     [cityTargets] => Array
>         (
>             [cities] => Array
>                 (
>                 )
>
>             [excludedCities] => Array
>                 (
>                 )
>
>         )
>
>     [proximityTargets] => Array
>         (
>             [circles] => Array
>                 (
>                 )
>
>         )
>
> )
>
> For a campaign that requires only a proximityTarget, we would pass:
>
> Array
> (
>     [countryTargets] => Array
>         (
>             [countries] => Array
>                 (
>                 )
>
>             [excludedCountries] => Array
>                 (
>                 )
>
>         )
>
>     [regionTargets] => Array
>         (
>             [regions] => Array
>                 (
>                 )
>
>             [excludedRegions] => Array
>                 (
>                 )
>
>         )
>
>     [metroTargets] => Array
>         (
>             [metros] => Array
>                 (
>                 )
>
>             [excludedMetros] => Array
>                 (
>                 )
>
>         )
>
>     [cityTargets] => Array
>         (
>             [cities] => Array
>                 (
>                 )
>
>             [excludedCities] => Array
>                 (
>                 )
>
>         )
>
>     [proximityTargets] => Array
>         (
>             [circles] => Array
>                 (
>                     [0] => Array
>                         (
>                             [latitudeMicroDegrees] => 53742000
>                             [longitudeMicroDegrees] => -365000
>                             [radiusMeters] => 30000
>                         )
>
>                 )
>
>         )
>
> )
>
> I think what you're suggesting is to drop each of the blank arrays if
> nothing is to be passed into them?
>
> Thanks Jeff,
>
> Gordon.
>
> On Feb 25, 8:24 pm, AdWords API Advisor <[email protected]>
> wrote:
>
>
>
> > Hello Gordon,
>
> >  I was interested in seeing your PHP code related to geotargets. I
> > guess APIlity just takes in all the potential properties for a
> > campaign in as parameters to the corresponding API's method call, so
> > I'd be interested in seeing what you're passing in to addCampaign().
> > Specifically, whether you're setting anything for the countryTargets,
> > regionTargets, etc. options, or leaving them out entirely.
>
> >  There's nothing I know of that has changed on the SOAP server end of
> > things in the past couple of days.
>
> > Cheers,
> > -Jeff Posnick, AdWords API Team
>
> > On Feb 25, 7:40 am, Gordon <[email protected]> wrote:
>
> > > Hi Jeff,
>
> > > Thanks again for your helpful comments.
>
> > > I tried to recreate the error I was having before applying the fix
> > > that you have suggested, however - I have been unsuccessful in doing
> > > so.
>
> > > I have rebuilt the account used in the requestedId values specified
> > > above three times now - each with a geo-targeted campaign going live
> > > successfully.
>
> > > I have not made any code adjustments, as I wanted to create the error,
> > > apply the fix and then check that the error did not recur.
>
> > > Owed to the fact that this seems to be working now, I am a little
> > > reluctant to make any code changes.  Are you aware of any fixes that
> > > may have been applied since our discussion?
>
> > > The client library I am currently using is APIlity 1.13.1.
>
> > > When you ask "...and what the code relating to geotargeting looks
> > > like?" - Do you mean what my code looks like when generating the
> > > Geotargets information, or what the code in APIlity looks like when
> > > generating the Geotargets information?
>
> > > Thanks Jeff - Your help is appreciated.
>
> > > Regards,
>
> > > Gordon.
>
> > > On Feb 24, 6:06 pm, AdWords API Advisor <[email protected]>
> > > wrote:
>
> > > > Hello Gordon,
>
> > > >  Thanks, I was able to look up your requests and the associated
> > > > exception that prevents them from completing.
>
> > > >  From what I can see and having run some requests of my own, the
> > > > internal error is being thrown because your <geoTargeting> element in
> > > > the SOAP request looks like:
>
> > > >       <geoTargeting>
> > > >         <countryTargets/>
> > > >         <regionTargets/>
> > > >         <metroTargets/>
> > > >         <cityTargets/>
> > > >         <proximityTargets>
> > > >           <circles>
> > > >             <latitudeMicroDegrees>51602000</latitudeMicroDegrees>
> > > >             <longitudeMicroDegrees>226000</longitudeMicroDegrees>
> > > >             <radiusMeters>45000</radiusMeters>
> > > >           </circles>
> > > >         </proximityTargets>
> > > >       </geoTargeting>
>
> > > > <geoTargeting> is defined in the WSDL as a <sequence>:
>
> > > >   <sequence>
> > > >     <element name="cityTargets" minOccurs="0" type="impl:CityTargets"/
>
> > > >     <element name="countryTargets" minOccurs="0"
> > > > type="impl:CountryTargets"/>
> > > >     <element name="metroTargets" minOccurs="0"
> > > > type="impl:MetroTargets"/>
> > > >     <element name="proximityTargets" minOccurs="0"
> > > > type="impl:ProximityTargets"/>
> > > >     <element name="regionTargets" minOccurs="0"
> > > > type="impl:RegionTargets"/>
> > > >     <element name="targetAll" type="xsd:boolean"/>
> > > >   </sequence>
>
> > > > Our SOAP servers are apparently strict about the order in which the
> > > > elements in this sequence can appear (which is technically the right
> > > > thing to do, but I don't think we're as strict elsewhere). So in any
> > > > case, your request XML should either include the elements in the order
> > > > in which they're defined in the sequence, or leave out the elements
> > > > that are empty anyway. You probably don't have control over the
> > > > ordering (I'm assuming you're using a client library that generates
> > > > the XML), but perhaps you're explicitly setting the countryTargets,
> > > > etc. elements to an empty value? Could you let us know which client
> > > > library you're using and what the code relating to geotargeting looks
> > > > like?
>
> > > > Cheers,
> > > > -Jeff Posnick, AdWords API Team
>
> > > > On Feb 24, 12:34 pm, Gordon <[email protected]> wrote:
>
> > > > > Hi Jeff,
>
> > > > > Sure - no problem.
>
> > > > > I wasn't sure if it was a good idea to post them on here or not.
>
> > > > > The requestId values are as follows:
>
> > > > >     * 93c11dc54a331bc14fd6464e928f2b5e
> > > > >     * 99bcc43e2039a84668fb5a543e0a5abb
> > > > >     * 8e334d88ce08a62e38ea0ca8daf68168
> > > > >     * 026c3efd77bf1696e0803e65bf24aa24
>
> > > > > Many Thanks,
>
> > > > > Gordon.
>
> > > > > On Feb 24, 4:45 pm, AdWords API Advisor <[email protected]>
> > > > > wrote:
>
> > > > > > Hello Gordon,
>
> > > > > >  Could you please post the requestIds here? Mail to the address I 
> > > > > > post
> > > > > > under isn't a good way to reach me, and requestIds are not sensitive
> > > > > > information.
>
> > > > > > Cheers,
> > > > > > -Jeff Posnick, AdWords API Team
>
> > > > > > On Feb 24, 7:30 am, Gordon <[email protected]> wrote:
>
> > > > > > > Hi Jeff,
>
> > > > > > > Thanks again for the reply.
>
> > > > > > > I have emailed some details to your e-mail address, including the
> > > > > > > requestId values of four failed API transactions.
>
> > > > > > > Your help is appreciated.
>
> > > > > > > Thanks,
>
> > > > > > > Gordon.
>
> > > > > > > On Feb 23, 3:48 pm, AdWords API Advisor 
> > > > > > > <[email protected]>
> > > > > > > wrote:
>
> > > > > > > > Hello Gordon,
>
> > > > > > > >  In order to properly diagnose those generic "Internal errors" 
> > > > > > > > what
> > > > > > > > I'd need is the value of the requestId SOAP response header. You
> > > > > > > > should be able to obtain that by turning on logging in APIlity 
> > > > > > > > (http://
> > > > > > > > google-apility.sourceforge.net/#Debugging) and taking a look at 
> > > > > > > > the
> > > > > > > > SOAP response message associated with the error.
>
> > > > > > > > Cheers,
> > > > > > > > -Jeff Posnick, AdWords API Team
>
> > > > > > > > On Feb 20, 5:41 am, Gordon <[email protected]> 
> > > > > > > > wrote:
>
> > > > > > > > > Hi Jeff,
>
> > > > > > > > > Thanks for speedy reply!
>
> > > > > > > > > I have made all necessary code adjustments - but we seem to be
> > > > > > > > > experiencing some problems when creating proximity geotargets 
> > > > > > > > > for a
> > > > > > > > > campaign.
>
> > > > > > > > > The API reports a 'An Internal Error Has Occurred.  Please 
> > > > > > > > > Retry Your
> > > > > > > > > Request', with an error code of '0'.
>
> > > > > > > > > I understand there were some changes in Adwords API v13 to the
> > > > > > > > > geotargets service, and I believe you can now add negative 
> > > > > > > > > geotargets
> > > > > > > > > - so I'm wondering if the array I'm passing in has some kind 
> > > > > > > > > of
> > > > > > > > > expected index missing.
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
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