Hello, I do not know the root cause of the error that you're seeing, other than that it's very likely to be something with your Java environment (such as the version of Axis you're using), since the same code does work for other users.
That being said, if you're doing new development in Java using the AdWords API, I'd recommend that you use our client libraries rather than going against the sample code: http://code.google.com/p/google-api-adwords-java/ The client library includes an example program for scheduling reports. Cheers, -Jeff Posnick, AdWords API Team On Feb 26, 9:47 pm, puzik <adayan...@gmail.com> wrote: > I'm trying to run the example of ScheduleReport both with sandbox and > real credentials and getting NullPointerException: > java.lang.NullPointerException > at > com.google.api.adwords.v13.ReportServiceSoapBindingStub.validateReportJob_aroundBody13$advice > (ReportServiceSoapBindingStub.java:146) > at > com.google.api.adwords.v13.ReportServiceSoapBindingStub.validateReportJob > (ReportServiceSoapBindingStub.java:1) > > Any ideas what can cause this? > > Here is the code: > > String namespace = "https://adwords.google.com/api/adwords/v13"; > > ReportInterface service= new ReportServiceLocator > ().getReportService(); > > ((Stub) service).setHeader(namespace, "email", email); > ((Stub) service).setHeader(namespace, "password", password); > ((Stub) service).setHeader(namespace, "useragent", useragent); > ((Stub) service).setHeader(namespace, "developerToken", > developerToken); > ((Stub) service).setHeader(namespace, "applicationToken", > applicationToken); > > DefinedReportJob job = new DefinedReportJob(); > job.setSelectedReportType("Structure"); > job.setAggregationTypes(new String[] {"Keyword"}); > job.setStartDay(new ReportDate(2009, 0, 1).toDate()); > job.setEndDay(new ReportDate(2009, 0, 1).toDate()); > job.setName("Demo Structure Keyword Report"); > job.setSelectedColumns(new String[] { > "Campaign", "CampaignId", "AdGroup", "AdGroupId", "Keyword", > "KeywordId", "MaximumCPC"}); > > service.validateReportJob(job); <--- This one is failing > > Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---