How can I get an API SOAP logs..? 2019년 4월 11일 목요일 오후 7시 35분 29초 UTC+9, kyung...@quantumpirates.com 님의 말: > > language: java 1.8 > IDE: eclipse > using Google Cloud Platform App Engine > > I want get all campaigns in my account, so I tried > com.google.api.ads.adwords.axis.v201809.cm.CampainServiceInterface's get() > method. > But I received "No campaigns were found", even I had campaigns. > > Moreover, when I use > com.google.api.ads.adwords.axis.v201809.cm.ReportDefinitionServiceInterface's > getReportFields() method, it brings me correct response. > > Please solve this problem. > > Under this section, I upload my codes. > > > > > > > > AdWordsSession session = null; > > CreateAdWordsSessionWithoutPropertiesFile > createAdWordsSessionWithoutPropertiesFile = new > CreateAdWordsSessionWithoutPropertiesFile(); > > try { > > session = createAdWordsSessionWithoutPropertiesFile.createAdWordsSession(); > > } catch (OAuthException | ValidationException e2) { > > e2.printStackTrace(); > > } catch (IOException e) { > > e.printStackTrace(); > > } > > AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance(); > > CampaignServiceInterface campaignService = adWordsServices.get(session, > CampaignServiceInterface.class); > > System.out.println(campaignService.toString()); > > int offset = 0; > > > // Create selector. > > SelectorBuilder builder = new SelectorBuilder(); > > Selector selector = builder > > .fields(CampaignField.Id, CampaignField.Name) > > .orderAscBy(CampaignField.Name) > > .offset(offset) > > .limit(100) > > .build(); > > > > CampaignPage page; > > do { > > // Get all campaigns. > > page = campaignService.get(selector); > > > > if(page == null) { > > System.out.println("page is null"); > > } > > > > System.out.println(page.getPageType()); > > System.out.println(page.toString()); > > > > > // Display campaigns. > > if (page.getEntries() != null) { > > for (Campaign campaign : page.getEntries()) { > > System.out.printf("Campaign with name '%s' and ID %d was > found.%n", campaign.getName(), campaign.getId()); > > } > > } else { > > System.out.println("No campaigns were found."); > > } > > > offset += 100; > > selector = builder.increaseOffsetBy(100).build(); > > } while (offset < page.getTotalNumEntries()); > > > >
-- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/dd5d0771-a6e6-4c22-abfd-0823631ba404%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.