locked
Report WSDL RRS feed

  • Question

  • Good Morning,

    In review of the Reporting WSDL, I am unable to locate the paramater to request that my returned file remain unzipped.  Will the latest release allow me to retrieve the file in an unzipped format?  If not, I will need a few more days to work on the migration of our legacy code.  Our C# code is processing the response in memory (no disk or DB), and will require a bit of work to migrate to the new release.  I have found an article that should assist me if I forced to work with the zipped formatting of the report. 

    Previous, https://adcenterapi.microsoft.com/AdCenterAPI.asmx?wsdl 

    - <s:complexType name="ReportRequest" abstract="true">
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ReportDates" type="tns:ArrayOfDateTime" />
      <s:element minOccurs="1" maxOccurs="1" name="ReportLanguage" type="tns:LanguageType" />
      <s:element minOccurs="1" maxOccurs="1" name="Format" type="tns:APIResultFileType" />
      <s:element minOccurs="1" maxOccurs="1" name="Zipped" type="s:boolean" />
    </s:sequence>
    </s:complexType>

    Current, https://adcenterapi.microsoft.com/v2/Reporting/Reporting.asmx?wsdl

    <s:complexType name="ReportRequest" abstract="true">

    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="StartDate" nillable="true" type="s:dateTime" />
      <s:element minOccurs="1" maxOccurs="1" name="EndDate" nillable="true" type="s:dateTime" />
      <s:element minOccurs="0" maxOccurs="1" name="ReportDates" type="tns:ArrayOfDateTime" />
      <s:element minOccurs="1" maxOccurs="1" name="ReportLanguage" type="tns:ReportLanguageType" />
      <s:element minOccurs="1" maxOccurs="1" name="Format" type="tns:APIResultFileType" />
      <s:element minOccurs="1" maxOccurs="1" name="AllNone" nillable="true" type="s:boolean" />
    </s:sequence>
    </s:complexType>
     
    Where can I find more information about the migration?  For instance what is the AllNone paramater?
     
    Thanks in advance.
     
    David
     
    Friday, September 29, 2006 12:12 PM

Answers

  • Hi David,

    The zipped option was removed by design.

    The AllNone option specifies whether partial data is returned if data is incomplete for the requested period.If this property is set to false, the currently available data for the requested period will be returned, even if the data is incomplete. If this property is set to true, a comparison is made between the latest requested reporting date and the currently available data. If data is not available for the latest requested reporting date, no data will be returned, and the ERROR_API_REPORT_NONE exception (-400063) will be returned.
    If an array of dates is used for the report request, the latest date is used for the all-or-none checking.
    If an array of campaign IDs are used for the report request, the date of the latest campaign time zone will be used as the requested date time zone.
    If an array of campaign IDs is not used for the report request, but a single account ID is used, all of the campaigns for the specified account will be used for the all-or-none checking. If an array of campaign IDs is not used for the report request, but multiple account IDs are used, the all-or-none checking will be performed for each account.
    For some data ranges, such as ThisWeek, Today, ThisMonth, or ThisYear, the AllNone property is ignored.

    The latest documentation discusses the zipped and AllNone items in the 3.15 release notes. You can get the updated documentation at the adCenter API site at http://connect.microsoft.com. You will need to access that site with your Windows Live ID enabled account. If you do not have access to the adCenter API site at http://connect.microsoft.com, contact your technical support representative.

    Thank you,

    Walter Poupore - MSFT

     

    Friday, September 29, 2006 4:57 PM
  • Good morning, David,

    Their latest release (September 19, 2006) says:

    "Version 3.15 of the Microsoft adCenter API includes the following reporting enhancements.
    Unzipped report file downloads are no longer supported
    The Zipped property of the ReportRequest class and its derived classes is being removed from the API. All downloadable reports will be zipped. "

    Have a nice day,
    Orest
    Friday, September 29, 2006 5:01 PM

All replies

  • Hi David,

    The zipped option was removed by design.

    The AllNone option specifies whether partial data is returned if data is incomplete for the requested period.If this property is set to false, the currently available data for the requested period will be returned, even if the data is incomplete. If this property is set to true, a comparison is made between the latest requested reporting date and the currently available data. If data is not available for the latest requested reporting date, no data will be returned, and the ERROR_API_REPORT_NONE exception (-400063) will be returned.
    If an array of dates is used for the report request, the latest date is used for the all-or-none checking.
    If an array of campaign IDs are used for the report request, the date of the latest campaign time zone will be used as the requested date time zone.
    If an array of campaign IDs is not used for the report request, but a single account ID is used, all of the campaigns for the specified account will be used for the all-or-none checking. If an array of campaign IDs is not used for the report request, but multiple account IDs are used, the all-or-none checking will be performed for each account.
    For some data ranges, such as ThisWeek, Today, ThisMonth, or ThisYear, the AllNone property is ignored.

    The latest documentation discusses the zipped and AllNone items in the 3.15 release notes. You can get the updated documentation at the adCenter API site at http://connect.microsoft.com. You will need to access that site with your Windows Live ID enabled account. If you do not have access to the adCenter API site at http://connect.microsoft.com, contact your technical support representative.

    Thank you,

    Walter Poupore - MSFT

     

    Friday, September 29, 2006 4:57 PM
  • Good morning, David,

    Their latest release (September 19, 2006) says:

    "Version 3.15 of the Microsoft adCenter API includes the following reporting enhancements.
    Unzipped report file downloads are no longer supported
    The Zipped property of the ReportRequest class and its derived classes is being removed from the API. All downloadable reports will be zipped. "

    Have a nice day,
    Orest
    Friday, September 29, 2006 5:01 PM
  • OK, thanks for the tips.

    Can you perhaps assist me in my quest for a quick solution?

    Our legacy C# code does not use the disk or DB when processing the report:

    <code>                
    // If report completed download it
                    if (requestResult.ReportStatus == APIStatusType.SUCCESS)
                    {
                        // Open a connection to the URL where the report is available
                        Console.WriteLine("   ready!");
                        Console.Write("   pulling report .");
                        webRequest = (HttpWebRequest)WebRequest.Create(
                            requestResult.ReportDownloadURL);
        
                        CallFunction = new Func(GetReport);
                        tmp = null;
                        MainThread.ConnectTimeOut(ref tmp, CallFunction, null, null);
                        HttpWebResponse response = (HttpWebResponse)tmp;

                        // Get the stream associated with the Response
                        Stream stream = response.GetResponseStream();
                      
                        BinaryReader reader = new BinaryReader(stream);
                        MemoryStream res_stream = new MemoryStream();
                        BinaryWriter writer = new BinaryWriter(res_stream);
                        while (true)
                        {
                            byte[] buf = reader.ReadBytes(bufSize);
                            writer.Write(buf);
                            if (buf.Length != bufSize) break;
                        }

                        reader.Close();
                        stream.Close();
                        res_stream.Position = 0;
                        Console.WriteLine("    finished");

                        // Pipe memory stream
                        readerb = new BinaryReader(res_stream);
                        char[] bcontent = readerb.ReadChars((int)readerb.BaseStream.Length);
                        string content = new string(bcontent);
                       
                        if (content.ToUpper().IndexOf("NO DATA IS AVAILABLE") > -1)
                        {
                            Console.WriteLine("   There is no data for this month. Proceed next account.");
                            Console.WriteLine("");
                            Console.WriteLine("");
                            continue;
                        }
                    }
                    else if (requestResult.ReportStatus.ToString().ToLower().IndexOf("fail") > -1)
                    {
                        throw new ApplicationException(
                            requestResult.ReportStatus.ToString());
                    }


    </code>

    Is there any .NET class for unzipping?

    I appreciate any tips or help with this migration.  I have also sent a message to who I hope is our technical contact, so that I can access these connect.microsoft.com as your suggested.

    David
    Friday, September 29, 2006 6:54 PM