如何获取完整的错误消息? (Bing Ads API) [英] How do I get the full error message? (Bing Ads API)

查看:73
本文介绍了如何获取完整的错误消息? (Bing Ads API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调用Bing Ads API时,我没有比"500 Internal Server Error"更具体的错误。我不明白是否可能/如何使用响应中提供的说明。

When I am calling the Bing Ads API I don't get any more specific error than "500 Internal Server Error". I don't understand if it's possible/how to use the instructions provided in the response.

我几乎使用文档中提供的确切代码示例。

I am using almost the exact code example provided in the documentation.

回复(抱歉,代码标签不起作用):

The response (sorry, code tags are not working):

状态代码:  500内部服务器ErrorHeader:  Cache-Control:privateContent-Length:730Content-Type:text / xml; charset = utf-8Server:Microsoft-IIS / 8.0X-AspNet-Version:4.0.30319X-Powered-By:ASP.NETDate:Mon,19 Aug 2013 13:58:34 GMTConnection:
close



< s:信封xmlns:s =" http://schemas.xmlsoap.org/soap/envelope/">< s:Body> ;

将S:故障与GT;<的faultcode的xmlns:A =" HTTP://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">一种:InternalServiceFault< / faultcode>
$
< faultstring xml:lang =" en-US">由于内部错误,服务器无法处理请求。 有关错误的详细信息,或者在IncludeExceptionDetailInFaults转动(无论是从ServiceBehaviorAttribute或从
&安培;&serviceDebug安培;配置行为LT; GT),以便在服务器上的异常信息发送回客户端,或转根据Microsoft .NET Framework SDK文档进行跟踪并检查服务器跟踪日志。< / faultstring>< / s:Fault>< / s:Body>< / s:Envelope>

Status Code:  500 Internal Server Error

Header:  Cache-Control: private
Content-Length: 730
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 19 Aug 2013 13:58:34 GMT
Connection: close

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>
<s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
<faultstring xml:lang="en-US">The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug&gt; configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.</faultstring></s:Fault></s:Body></s:Envelope>

我的要求:

<?xml version =" 1.0 " encoding =" utf-8"?>

        < s:Envelope xmlns:s =" http://schemas.xmlsoap.org/soap/envelope/">

        ;&NBSP;&NBSP; < s:标题>

            < h:ApplicationToken i:nil =" true"的xmlns:H =" HTTPS://adcenter.microsoft.com/v8"的xmlns:I =" HTTP://www.w3.org/2001/XMLSchema-instance" />
$
            < h:CustomerAccountId i:nil =" true"的xmlns:H =" HTTPS://adcenter.microsoft.com/v8"的xmlns:I =" HTTP://www.w3.org/2001/XMLSchema-instance" />
$
            < h:CustomerId i:nil =" true"的xmlns:H =" HTTPS://adcenter.microsoft.com/v8"的xmlns:I =" HTTP://www.w3.org/2001/XMLSchema-instance" />
$
            < h:DeveloperToken xmlns:h =" https://adcenter.microsoft.com/v8"> --- masked ---< / h:DeveloperToken>

   ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < h:密码xmlns:h =" https://adcenter.microsoft.com/v8"> secret< / h:密码>

      &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < h:UserName xmlns:h =" https://adcenter.microsoft.com/v8"> secret< / h:UserName>

      &NBSP;&NBSP;&NBSP;&NBSP; < / s:Header>

          < s:正文>&
            < SubmitGenerateReportRequest的xmlns = QUOT; HTTPS://adcenter.microsoft.com/v8">

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP; < ReportRequest i:type =" KeywordPerformanceReportRequest" xmlns:i =" http://www.w3.org/2001/XMLSchema-instance">

          &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; <格式> Xml< /格式>

                < Language i:nil =" true" />               < REPORTNAME>我关键字效果报告与LT; / REPORTNAME>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < ReturnOnlyCompleteData>假LT; / ReturnOnlyCompleteData>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; <凝聚>每日和LT; /聚集>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < Columns>&
                  < KeywordPerformanceReportColumn> TIMEPERIOD< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> ACCOUNTID< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> CAMPAIGNID< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>关键字< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> KeywordId< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>设备类型< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> BidMatchType< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>点击< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>曝光< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> CTR< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn> AverageCpc< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>花< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < KeywordPerformanceReportColumn>的QualityScore< / KeywordPerformanceReportColumn>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < / Columns>&
                <过滤>&$ b&n;                  < AdDistribution i:nil =" true" />                 < AdType i:nil =" true" />                 < BidMatchType i:nil =" true" />                 < Cashback i:nil =" true" />                 < DeliveredMatchType i:nil =" true" />                 <设备类型>计算机的SmartPhone< /设备类型>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP; < KeywordRelevance i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < Keywords i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < LandingPageRelevance i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < LandingPageUserExperience i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < LanguageAndRegion i:nil =" true" />                 < LanguageCode i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < QualityScore i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />               < / Filter>&
                <范围>

                  < AccountIds i:nil =" true"的xmlns:A =" HTTP://schemas.microsoft.com/2003/10/Serialization/Arrays" />                 < AdGroups i:nil =" true" />                 <广告系列>&
                    < CampaignReportScope>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP; < ParentAccountId→2< / ParentAccountId>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP; < CAMPAIGNID> 33< / CAMPAIGNID>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP; < / CampaignReportScope>&
                  < / Campaigns>&
                < / Scope>&
                <时间>&bbsp;                  < CustomDateRangeEnd i:nil =" true" />                 < CustomDateRangeStart i:nil =" true" />                 < PredefinedTime>昨天< / PredefinedTime>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < /时间>

              < / ReportRequest>&
            < / SubmitGenerateReportRequest>
$
          < / s:正文>

        < / s:Envelope>

<?xml version="1.0" encoding="utf-8"?>
        <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
          <s:Header>
            <h:ApplicationToken i:nil="true" xmlns:h="https://adcenter.microsoft.com/v8" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
            <h:CustomerAccountId i:nil="true" xmlns:h="https://adcenter.microsoft.com/v8" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
            <h:CustomerId i:nil="true" xmlns:h="https://adcenter.microsoft.com/v8" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
            <h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v8">---masked---</h:DeveloperToken>
            <h:Password xmlns:h="https://adcenter.microsoft.com/v8">secret</h:Password>
            <h:UserName xmlns:h="https://adcenter.microsoft.com/v8">secret</h:UserName>
          </s:Header>
          <s:Body>
            <SubmitGenerateReportRequest xmlns="https://adcenter.microsoft.com/v8">
              <ReportRequest i:type="KeywordPerformanceReportRequest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <Format>Xml</Format>
                <Language i:nil="true" />
                <ReportName>My Keyword Performance Report</ReportName>
                <ReturnOnlyCompleteData>false</ReturnOnlyCompleteData>
                <Aggregation>Daily</Aggregation>
                <Columns>
                  <KeywordPerformanceReportColumn>TimePeriod</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>AccountId</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>CampaignId</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>Keyword</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>KeywordId</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>DeviceType</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>BidMatchType</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>Clicks</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>Impressions</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>Ctr</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>AverageCpc</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>Spend</KeywordPerformanceReportColumn>
                  <KeywordPerformanceReportColumn>QualityScore</KeywordPerformanceReportColumn>
                </Columns>
                <Filter>
                  <AdDistribution i:nil="true" />
                  <AdType i:nil="true" />
                  <BidMatchType i:nil="true" />
                  <Cashback i:nil="true" />
                  <DeliveredMatchType i:nil="true" />
                  <DeviceType>Computer SmartPhone</DeviceType>
                  <KeywordRelevance i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <Keywords i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <LandingPageRelevance i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <LandingPageUserExperience i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <LanguageAndRegion i:nil="true" />
                  <LanguageCode i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <QualityScore i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                </Filter>
                <Scope>
                  <AccountIds i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
                  <AdGroups i:nil="true" />
                  <Campaigns>
                    <CampaignReportScope>
                      <ParentAccountId>2</ParentAccountId>
                      <CampaignId>33</CampaignId>
                    </CampaignReportScope>
                  </Campaigns>
                </Scope>
                <Time>
                  <CustomDateRangeEnd i:nil="true" />
                  <CustomDateRangeStart i:nil="true" />
                  <PredefinedTime>Yesterday</PredefinedTime>
                </Time>
              </ReportRequest>
            </SubmitGenerateReportRequest>
          </s:Body>
        </s:Envelope>

推荐答案

您好。

您提供的SOAP适用于我。请再次检查,因为可能是另一个操作导致上述错误。您提到的错误消息不是Bing Ads特定错误,而是与SOAP架构或命名空间有关。
例如,如果您从此行中删除"i:"或":i"并将其他所有内容保持不变,则可能会收到上述错误。

The SOAP you provided works on my end. Please check again, since it is possible another operation is causing the error above. The error message you mentioned is not a Bing Ads specific error, and would have more to do with SOAP schema or namespaces. For example if you remove 'i:' or ':i' from this line and left everything else unchanged, you may receive the above error.

< ReportRequest I:式= QUOT; KeywordPerformanceReportRequest" xmlns:i =" http://www.w3.org/2001/XMLSchema-instance "> ;

<ReportRequest i:type="KeywordPerformanceReportRequest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

有关处理错误和异常的更多信息,请参阅
http://msdn.microsoft.com/en-US/library/aa983155.aspx。

For more information on handling errors and exceptions, please see http://msdn.microsoft.com/en-US/library/aa983155.aspx.

我希望这会有所帮助。


这篇关于如何获取完整的错误消息? (Bing Ads API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆