Hi Daniel, Do you have the SOAP XML logs from such a request? This may provide more information about the source of the issue.
Best, - Eric Koleda, AdWords API Team On Oct 26, 11:51 am, DanielB <d...@coolblue.nl> wrote: > I was trying the enclosed (.Net) code example, which gave me the exact > same error. So maybe it is a problem in the .Net api. > > public void Run(AdWordsUser user) > { > InfoService infoService = (InfoService)user.GetService > (AdWordsService.v200909.InfoService); > > // Since we are requesting the total API usage, clear out > // the clientEmail field. > infoService.RequestHeader.clientEmail = null; > InfoSelector selector = new InfoSelector(); > selector.apiUsageTypeSpecified = true; > selector.apiUsageType = ApiUsageType.UNIT_COUNT; > > // Request for API usage from 1st to 30th Sep 2009. > DateTime startDate = new DateTime(2009, 9, > 1).ToUniversalTime(); > DateTime endDate = new DateTime(2009, 9, > 30).ToUniversalTime(); > > selector.dateRange = new DateRange(); > selector.dateRange.min = startDate.ToString("yyyyMMdd"); > selector.dateRange.max = endDate.ToString("yyyyMMdd"); > > try > { > ApiUsageInfo usageInfo = infoService.get(selector); > MessageBox.Show("The total Api usage between '{0}' and > '{1}' is {2} units." + usageInfo.cost); > } > catch (Exception ex) > { > MessageBox.Show("Failed to retrieve total Api usage in > the given date range. " + > "Exception says \"{0}\"" + ex.Message); > } > } > > On Oct 26, 4:02 pm, DanielB <d...@coolblue.nl> wrote: > > > > > Hi all, > > > Now I am trying to make a connection to the v200909 version instead of > > the v13 version. The connection works but when I request data I get an > > error The request failed with HTTP status 405: Method Not Allowed At > > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse > > (SoapClientMessage message, WebResponse response, Stream > > responseStream, Boolean asyncCall) At > > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String > > methodName, Object[] parameters) > > At com.google.api.adwords.v200909.AdGroupService.get(AdGroupSelector > > selector) at ScriptMain.CreateNewOutputRows() > > > What I am doing here is making the connection, > > > The code for which I am testing the connection and (assume) to get a > > single row, which doesn't work: > > > public override void CreateNewOutputRows() > > { > > try > > { > > AdWordsUser user = new AdWordsUser(); > > AdGroupService service = (AdGroupService)user.GetService > > (AdWordsService.v200909.AdGroupService); > > int adgroupid = <%SOME ADGROUPID%>; > > int campaignid = <%SOME CAMPAIGNID%>; > > long[] adgroupids = { adgroupid }; > > > DateTime datum = DateTime.Parse("2009-09-01"); > > > // Haal dan de stats op per datum > > try > > { > > // Set up service connection. > > AdGroupSelector selector = new AdGroupSelector(); > > selector.campaignId = campaignid; > > selector.adGroupIds = adgroupids; > > StatsSelector statselector = new StatsSelector(); > > DateRange range = new DateRange(); > > > range.min = datum.ToString("yyyyMMdd"); > > range.max = datum.ToString("yyyyMMdd"); > > > statselector.dateRange = range; > > selector.statsSelector = statselector; > > AdGroupPage page = new AdGroupPage(); > > //page = service.get(selector); > > MessageBox.Show(service.get(selector).ToString()); > > } > > catch (Exception e) > > { > > MessageBox.Show(e.ToString()); > > } > > > } > > catch (Exception e) > > { > > MessageBox.Show(e.ToString()); > > } > > } > > > Does anybody have an idea how I can solve this problem? > > > Regards, > > > Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---