v2011109 沙盒上的 Adwords API 出现 500 错误
我需要创建一个沙盒帐户:http://code.google.com/apis /adwords/docs/sandbox.html
不幸的是,我在针对他们提供的 WSDL 位置发出 GET 时收到 500 错误(没有此类操作:(HTTP GET PATH_INFO: /v201109/CampaignService))
该链接指出:
要创建沙箱帐户,请向沙箱发送 get 请求 CampaignService 的版本,使用 WSDL 位置和沙箱 标题如下所述。对沙箱的初始调用会创建 用于电子邮件的 MCC 沙盒帐户以及五个客户帐户 您指定的地址。您的沙盒帐户及其客户帐户 从空开始。”
我使用以下命令创建了 authToken:
my $token = Google::Ads::Common::AuthToken::get_token({
email => EMAIL,
password => PASSWORD,
service => "adwords"
});
但是,向指定的 WSDL 位置发出 GET 请求会产生结果 出现 500 错误,内容如下:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>No such operation: (HTTP GET PATH_INFO: /v201109/CampaignService)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
我正在使用以下代码:
use HTTP::Request;
use LWP::UserAgent;
my $wsdl_location =
'https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService';
my $req = HTTP::Request->new( GET => $wsdl_location );
$req->header(
":authToken" => $auth_token,
":developerToken" => EMAIL . '++USD',
":userAgent" => 'weborama',
);
my $ua = LWP::UserAgent->new;
$ua->add_handler("request_send", sub { shift->dump; return });
$ua->add_handler("response_done", sub { shift->dump; return });
my $res = $ua->request($req);
if ( $res->is_success ) {
print $res->content;
}
else {
print $res->status_line, "\n";
}
我的请求标头:
GET https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService
User-Agent: libwww-perl/6.02
authToken: *********
developerToken: EMAIL++USD
userAgent: weborama
有人使用 Perl 和 v201109 完成此工作吗?我错过了一些明显的东西吗? (我没有从 Google Adwords API 论坛得到任何回复)
I need to create a sandbox account: http://code.google.com/apis/adwords/docs/sandbox.html
Unfortunately, I'm getting a 500 error when issuing the GET against the WSDL location they supplied, (No such operation: (HTTP GET PATH_INFO: /v201109/CampaignService))
That link states:
To create a sandbox account, send a get request to the sandbox
version of CampaignService, using the WSDL location and sandbox
headers as described below. This initial call to the sandbox creates
an MCC sandbox account, along with five client accounts, for the email
address you specified. Your sandbox account and its client accounts
start out empty."
I created my authToken with:
my $token = Google::Ads::Common::AuthToken::get_token({
email => EMAIL,
password => PASSWORD,
service => "adwords"
});
However, issuing a GET request to the specified WSDL location results
in a 500 error with the following content:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>No such operation: (HTTP GET PATH_INFO: /v201109/CampaignService)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I'm using the following code:
use HTTP::Request;
use LWP::UserAgent;
my $wsdl_location =
'https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService';
my $req = HTTP::Request->new( GET => $wsdl_location );
$req->header(
":authToken" => $auth_token,
":developerToken" => EMAIL . '++USD',
":userAgent" => 'weborama',
);
my $ua = LWP::UserAgent->new;
$ua->add_handler("request_send", sub { shift->dump; return });
$ua->add_handler("response_done", sub { shift->dump; return });
my $res = $ua->request($req);
if ( $res->is_success ) {
print $res->content;
}
else {
print $res->status_line, "\n";
}
My request headers:
GET https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService
User-Agent: libwww-perl/6.02
authToken: *********
developerToken: EMAIL++USD
userAgent: weborama
Has anyone made this work with Perl and v201109? Am I missing something obvious? (I'm getting no response from the Google Adwords API forum)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您想要 https://adwords-sandbox.google .com/api/adwords/cm/v201109/CampaignService?wsdl
I'm assuming you want https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService?wsdl