0
votes

I am executing the following soap request to adcenter api but am getting an error

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Reporting/v9">
    <Action mustUnderstand="1">SubmitGenerateReport</Action>
    <DeveloperToken i:nil="false">XXXXXX</DeveloperToken>
    <Password i:nil="false">XXXXXXX</Password>
    <UserName i:nil="false">XXXXXXX</UserName>
  </s:Header>
  <s:Body>
    <SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v9">
      <ReportRequest i:nil="false" i:type="KeywordPerformanceReportRequest">
        <ReportName i:nil="false">Keyword Performance Report</ReportName>
        <ReturnOnlyCompleteData i:nil="false">false</ReturnOnlyCompleteData>
         <!--Keep these fields if you set the i:type attribute to KeywordPerformanceReportRequest-->
        <Aggregation>Daily</Aggregation>
        <Columns i:nil="false">
          <KeywordPerformanceReportColumn>AccountName</KeywordPerformanceReportColumn>
          <KeywordPerformanceReportColumn>CampaignName</KeywordPerformanceReportColumn>
          <KeywordPerformanceReportColumn>Keyword</KeywordPerformanceReportColumn>
          <KeywordPerformanceReportColumn>TimePeriod</KeywordPerformanceReportColumn>
          <KeywordPerformanceReportColumn>Impressions</KeywordPerformanceReportColumn>
          <KeywordPerformanceReportColumn>Conversions</KeywordPerformanceReportColumn>
        </Columns>
        <MaxRows></MaxRows>
        <Scope i:nil="false">
          <AccountIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a:int>2738383</a:int>
          </AccountIds>
        </Scope>
       </ReportRequest>
    </SubmitGenerateReportRequest>
  </s:Body>
</s:Envelope>

I getting the following error

HTTP/1.1 500 Internal Server Error Content-Length: 747 Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/8.0 X-Powered-By: ASP.NET Date: Thu, 08 May 2014 19:21:21 GMT

a:DeserializationFailedThe formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/Reporting/v9:ReportRequest. The InnerException message was 'There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Request.ReportRequest. The value '' cannot be parsed as the type 'Int32'.'. Please see InnerException for more details.

Can someone please check this request and tell me what could be wrong with this soap request. I have tried executing it in SOAPUI but could not understand the issue

Arif

1

1 Answers

0
votes

I found the issue. I had to provide the maximum rows value in the below tag

<MaxRows></MaxRows>

Arif