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