locked
Did someone break the Reporting Service? RRS feed

  • Question

  • This morning when I arrived at work, I found that our report did not run on Sunday.

    However it did run on Saturday.

    I am sure no one has changed my script, but it is now giving the error:

    PHP Fatal error:  SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined.

    Has the wsdl been changed over the weekend?
    https://adcenterapi.microsoft.com/api/advertiser/v5.1/Reporting/ReportingService.svc?wsdl


    Hackzilla

    Monday, August 4, 2008 3:17 PM

Answers

  • while ($this->soap_client == null) {
        try {
             $this->soap_client = new SoapClient($wsdl, $opts);
        } catch(SoapFault $sf) {
            $this->debug('tc_ms_api::__construct: soap fault', $sf->getMessage());
            $this->debug('SOAP-ERROR: Parsing Schema', 'WILL TRY AGAIN IN 5 SECONDS');
            $this->soap_client = null;
            sleep(5);
        }
    }
    • Marked as answer by Hackzilla Monday, January 5, 2009 3:35 PM
    Saturday, December 6, 2008 1:03 AM
  • Ron Ludwig said:

    while ($this->soap_client == null) {
        try {
             $this->soap_client = new SoapClient($wsdl, $opts);
        } catch(SoapFault $sf) {
            $this->debug('tc_ms_api::__construct: soap fault', $sf->getMessage());
            $this->debug('SOAP-ERROR: Parsing Schema', 'WILL TRY AGAIN IN 5 SECONDS');
            $this->soap_client = null;
            sleep(5);
        }
    }

    The error had kept showing up for me, even after Microsoft had fixed the issue.

    The above code (after modifying to suit my needs) seems to have fixed the issue.

    However because the issue is so intermittent, only time will tell.


    Hackzilla
    • Edited by Hackzilla Monday, January 5, 2009 3:37 PM typo
    • Marked as answer by Chris Norred MSFT Tuesday, January 6, 2009 12:12 AM
    Monday, January 5, 2009 3:37 PM

All replies

  • This problem seems to go away after I call the page 3 or 4 times in quick succession.

    However it failed again this morning and again, worked after calling it a few times.


    I am not sure if the wsdl were changed and now PHP has a cached copy?


    Hackzilla
    Tuesday, August 5, 2008 10:02 AM
  •  

    Hi Hack,

    I'll research now and see if I can find some info. Thank you for using the forum.

     

    Chris

    Tuesday, August 5, 2008 6:04 PM
  •  

    Hi Hackzilla,

     

    We have not made any recent changes to the WSDL files so this problem may be arising from another issue.

     

    In fact, we recommend that you disable WSDL caching in your code by including the below line:

    ini_set("soap.wsdl_cache_enabled", "0");


     

    If the problem does go away after 3-4 attempts, it may be a network related problem where you're not always getting the full WSDL XML.  Looking at the debug log to ensure that all the XML packets appear full might help.

     

    Thank you.

     

    Steven Hong, MSFT adCenter API Support

    Tuesday, August 5, 2008 7:02 PM
  • I get the same error periodically (especially high frequency with the reporting service).


    I think this might be some sort of fallout from making frequent API calls.  I have set my code to catch this error and retry.
    Wednesday, August 6, 2008 8:17 PM
  •  

    Hack,

     

    That is possible.  While I'm not familiar with any throttling limits that may be imposed, I do believe that network infrastructure does try to maintain some sort of quality control and too frequent of an access attempt may inadvertantly be dropped.  If you can provide more specific information:

    - Exact time when you make the attempt

    - How many times

    - What percentage of your calls are failing

    - Traceroute of your server to adCenter server

     

    Any possibly captures of your network packets, we may be able to do further analysis.  In the mean time, you may want to consider introducing some sleep intervals between the calls.

     

    Thank you.

     

    Steven Hong, MSFT adCenter API Support

    Thursday, August 7, 2008 12:18 AM

  • The times that feed has failed was 8:00

    9:20
    9:22
    9:24

    We have run traceroute, and this is the out come

     1:  89.234.7.194 (89.234.7.194)                            1.428ms
     2:  core3-10.lon2.rackspace.net (83.138.150.86)            0.630ms
     3:  vlan903.edge3.lon2.rackspace.com (83.138.150.20)       2.764ms
     4:  sl-gw23-lon-4-0-1.sprintlink.net (82.195.189.101)      1.930ms
     5:  sl-bb22-lon-8-0.sprintlink.net (213.206.128.60)        2.607ms
     6:  sl-bb20-nyc-2-0.sprintlink.net (144.232.9.163)       asymm  7  69.730ms
     7:  sl-crs1-nyc-0-0-0-0.sprintlink.net (144.232.7.104)   asymm  9  69.952ms
     8:  sl-crs2-chi-0-7-0-0.sprintlink.net (144.232.20.102)  asymm  9  92.310ms
     9:  sl-bb20-sea-1-0.sprintlink.net (144.232.20.85)       asymm 11 137.821ms
    10:  sl-gw20-sea-0-0-0.sprintlink.net (144.232.6.8)       asymm 11 136.887ms
    11:  sl-microsoft-195453-0.sprintlink.net (144.224.113.146) asymm 15 143.504ms
    12:  ge-5-3-0-57.tuk-64cb-1b.ntwk.msn.net (207.46.41.37)  asymm 15 143.349ms
    13:  ten1-2.tuk-76c-1a.ntwk.msn.net (207.46.44.50)        asymm 14 143.536ms
    14:  po16.tuk-65ns-mcs-1b.ntwk.msn.net (207.46.35.142)    asymm 16 143.446ms
    15:  no reply
    16:  no reply
    17:  no reply
    18:  no reply
    19:  no reply
    20:  no reply

    We have added ini_set("soap.wsdl_cache_enabled", "0"); when the first call failed.

    We this fails.  It is failing on this line

    $client = new SOAPClient('https://adcenterapi.microsoft.com/api/advertiser/v5.1/Reporting/ReportingService.svc?wsdl', $opts);

    This is only called once a day.
    So delaying, or slowing down the script will have no effect.

    Our 5th call was successful, so our error rate today was 80%

    I will have a look at if the xml is coming back incomplete, but not quite sure how I can achieve this.


    Hackzilla
    Thursday, August 7, 2008 9:19 AM
  • Hi Hackzilla et all,

    I've traced this problem down to an interesting little issue.

    If you go to the url: https://adcenterapi.microsoft.com/Api/Advertiser/V5.1/Reporting/ReportingService.svc?xsd=xsd0

    there are actually two different versions which can be served arbitrarily.

    if your initial version looks like:

    (A)
    <code>
    ...
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/Api/Advertiser/V5.1/Reporting/ReportingService.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/Api/Advertiser/V5.1/Reporting/ReportingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
    ...
    </code>


    see http://www.acronym.com/dat/junk/good-ReportingService.svcxsd0.svc.xml

    then everything will run dandy.

    BUT if your initial version looks like this:
    <code>
    ...
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/API/ADVERTISER/V5.1/REPORTING/ReportingService.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/API/ADVERTISER/V5.1/REPORTING/ReportingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
    ...
    </code>

    see http://www.acronym.com/dat/junk//bad-ReportingService.svc.xsd0.xml

    then PHP will throw an error because when it loads the first url (which resolves to  the same location on a MSN server), it will include: 
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/Api/Advertiser/V5.1/Reporting/ReportingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>

    when it loads the next include:
    <xs:import schemaLocation="https://adcenterapi.microsoft.com/API/ADVERTISER/V5.1/REPORTING/ReportingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>

    it will encounter identical types.

    schemalocations are case sensitive since they contain urls.
    Thursday, August 7, 2008 9:33 PM
  • I've encountered strangeness with the Reporting servers before: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3666158&SiteID=1

    It might be that their load-balancing servers all have different copies of the wsdl...
    Thursday, September 11, 2008 6:04 PM
  •  

    The post you mention was actually an unrelated issue. We've checked our servers, and did not find any inconsistencies.

    Jeff Dillon, API Support

    Tuesday, September 16, 2008 6:49 PM
  • Hello,

    We have been experiencing the same issue for the past few days, although we didn't change a single line of our MSN AdCenter synching scripts since the last API update ! 


    Best regards,

    Guill
    Monday, November 17, 2008 11:14 AM
  • As a possible solution, even temporarily, can you always force lowercase across the URL's?

    Jeff Dillon, API Support
    Monday, November 17, 2008 4:57 PM
  • Hi,
    I am facing the same problem. It actually started on 14th of this month. Whenever I run the script which downloads keyword reports I get the error as
    [faultstring] => SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined
    [faultcode] => WSDL.

    I have ini_set("soap.wsdl_cache_enabled", "0"); written on the top of my page.  I have no clue how to debug this issue.

    Please help.

    Thanks

    - dyutiman
    Tuesday, November 18, 2008 8:08 AM
  • I just tried the same script with ini_set("soap.wsdl_cache_enabled", "1"); and it was successful.


    - dyutiman
    Tuesday, November 18, 2008 10:13 AM
  • hi,
    It again stopped working.  Anybody got any solution? Please help. My tool stopped getting data from MSN.

    - dyutiman
    • Proposed as answer by Ron Ludwig Friday, December 5, 2008 8:14 PM
    Tuesday, November 25, 2008 11:15 AM
  • while ($this->soap_client == null) {
        $wsdl = TC_MS_WSDL.$service.'/'.$service.'Service.svc?wsdl';
        try {
            $this->soap_client = new SOAPClient($wsdl, $opts);
        } catch(Exception $ex) {
            $this->debug('tc_ms_api::__construct: soap exception', $ex->getMessage());
            $this->debug('SOAP ERROR: WILL TRY AGAIN IN 5 SECONDS');
            $this->soap_client = null;
            sleep(5);
        }
    }
    Friday, December 5, 2008 8:17 PM
  • while ($this->soap_client == null) {
        try {
             $this->soap_client = new SoapClient($wsdl, $opts);
        } catch(SoapFault $sf) {
            $this->debug('tc_ms_api::__construct: soap fault', $sf->getMessage());
            $this->debug('SOAP-ERROR: Parsing Schema', 'WILL TRY AGAIN IN 5 SECONDS');
            $this->soap_client = null;
            sleep(5);
        }
    }
    • Marked as answer by Hackzilla Monday, January 5, 2009 3:35 PM
    Saturday, December 6, 2008 1:03 AM
  • Ron Ludwig said:

    while ($this->soap_client == null) {
        try {
             $this->soap_client = new SoapClient($wsdl, $opts);
        } catch(SoapFault $sf) {
            $this->debug('tc_ms_api::__construct: soap fault', $sf->getMessage());
            $this->debug('SOAP-ERROR: Parsing Schema', 'WILL TRY AGAIN IN 5 SECONDS');
            $this->soap_client = null;
            sleep(5);
        }
    }

    The error had kept showing up for me, even after Microsoft had fixed the issue.

    The above code (after modifying to suit my needs) seems to have fixed the issue.

    However because the issue is so intermittent, only time will tell.


    Hackzilla
    • Edited by Hackzilla Monday, January 5, 2009 3:37 PM typo
    • Marked as answer by Chris Norred MSFT Tuesday, January 6, 2009 12:12 AM
    Monday, January 5, 2009 3:37 PM
  • Finally found that the above code works perfectly and that there is still an issue with the WSDL.

    Hackzilla


    SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined

    WILL TRY AGAIN IN 5 SECONDS

    SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined

    WILL TRY AGAIN IN 5 SECONDS

    SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined

    WILL TRY AGAIN IN 5 SECONDS

    SOAP-ERROR: Parsing Schema: element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' already defined

    WILL TRY AGAIN IN 5 SECONDS


    Total wait time so far is 0 minutes.

    Waiting another 5 minutes.
    ReportStatus: Success

    Monday, February 23, 2009 10:49 AM