I am having problems running the example GetRelatedTokens in my grails app. I am getting a [RequiredError.REQUIRED @ selector] exception when I call targetingIdeaService.get(selector). Since I am using exactly the code provided in the example, I am a bit confused as to what I am missing. I went through the xml.log (attached with two separate runs) and it appeared to my naive eye that the selectors were what I had entered (keyword and match type), so do I need to add another selector? There is no KeyWordMatchType.REQUIRED. My reading of the v201109 api leads me to believe I am providing a keyword and a keywordmatchtype are required, which is what I see in the log.
My code is below (because of a name conflict with KeyWord, I refer to it AS GKeyWord from the import): // Get the TargetingIdeaService. TargetingIdeaServiceInterface targetingIdeaService = user.getService(AdWordsService.V201109.TARGETING_IDEA_SERVICE) // Create selector. TargetingIdeaSelector selector = new TargetingIdeaSelector() selector.requestType = RequestType.IDEAS AttributeType[] attrTypes = [AttributeType.CRITERION,AttributeType.AVERAGE_TARGETED_MONTHLY_SEARCHES] selector.requestedAttributeTypes = attrTypes // Set selector paging (required for targeting idea service). Paging thePage = new Paging() thePage.startIndex = 0 thePage.numberResults = 20 selector.paging = thePage // Create seed keyword. def keyObj = new GKeyword() keyObj.text = seedKey keyObj.matchType = KeywordMatchType.BROAD // Create related to keyword search parameter. def relatedToKeywordSearchParameter = new RelatedToKeywordSearchParameter() GKeyword[] myKeywords = [keyObj] relatedToKeywordSearchParameter.keywords = myKeywords // create keyword match type search parameters and make it BROAD def keywordMatchTypeSearchParameter = new KeywordMatchTypeSearchParameter() KeywordMatchType[] theMatchTypes = [KeywordMatchType.BROAD, KeywordMatchType.REQUIRED] keywordMatchTypeSearchParameter.keywordMatchTypes = theMatchTypes SearchParameter[] theSearchParameters = [relatedToKeywordSearchParameter, keywordMatchTypeSearchParameter] selector.searchParameters = theSearchParameters // Get related keywords. TargetingIdeaPage page = targetingIdeaService.get(selector) So what am I missing or forgetting to put in? Thanks in advance! -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
soap_xml.log
Description: Binary data
