*Hi,*
*
*
*i was trying to update my older adwords api adhoc report down-loader code 
to new version. i used following code found at Google  codes.*

*public class DownloadAdHocReport {*
*  public static void main(String[] args) {*
*    try {*
*      // Log SOAP XML request and response.*
*      AdWordsServiceLogger.log();*
*
*
*      // Get AdWordsUser from "~/adwords.properties".*
*      AdWordsUser user = new AdWordsUser();*
*
*
*      // Location to download report to.*
*      String reportFile = "report_mik_adwords.csv";*
*
*
*      // Create selector.*
*      Selector selector = new Selector();*
*      selector.setFields(new String[] {"AdGroupId", "Id", "KeywordText", 
"KeywordMatchType",*
*          "Impressions", "Clicks", "Cost"});*
*
*
*      // Create report definition.*
*      ReportDefinition reportDefinition = new ReportDefinition();*
*      reportDefinition.setReportName("Keywords performance report #" + 
System.currentTimeMillis());*
*      
reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);*
*      
reportDefinition.setReportType(ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT);
*
*      reportDefinition.setDownloadFormat(DownloadFormat.CSV);*
*      reportDefinition.setIncludeZeroImpressions(false);*
*      reportDefinition.setSelector(selector);*
*
*
*      FileOutputStream fos = new FileOutputStream(new File(reportFile));*
*      ReportDownloadResponse response = ReportUtils.downloadReport(user, 
reportDefinition, fos);*
*      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {*
*        System.out.println("Report successfully downloaded: " + 
reportFile);*
*      } else {*
*        System.out.println("Report was not downloaded. " + 
response.getHttpStatus() + ": "*
*            + response.getHttpResponseMessage());*
*      }*
*    } catch (Exception e) {*
*      e.printStackTrace();*
*    }*
*  }*
*}*

*after running i was getting the following error:*

*Exception in thread "main" java.lang.NoSuchMethodError: 
com.google.api.adwords.lib.AdWordsUser.isUsingSandbox()Z*
* at 
com.google.api.adwords.lib.utils.v201109.ReportUtils.getServer(ReportUtils.java:302)
*
* at 
com.google.api.adwords.lib.utils.v201109.ReportUtils.generateAdHocReportUrl(ReportUtils.java:316)
*
* at 
com.google.api.adwords.lib.utils.v201109.ReportUtils.downloadReport(ReportUtils.java:186)
*
* at connexiona.DownloadAdHocReport.main(DownloadAdHocReport.java:53)*
*
*
*and my adwords.properties file looks like this:*
*
*
email=myloginemailid
password=password
clientId=myloginemailid_since_i_don't_know_client_id
useragent=company_name
developerToken=dev_token
useSandbox=false
partialFailure=false
returnMoneyInMicros=false

Can any one help me to solve the issue?

Thanks in advance for any help you can offer!

**

*-Mik*

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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

Reply via email to