• Register

ACTIVE Network API Forums

API Forum

RSS Feed

Strange problem

    • MaryF
    • Topic created 13 years ago

    We have been using the API for over a year now. I use asp.net's DataSet object's ReadXML method to read the XML feed. I creates tables and related tables etc. I have been successfully parsing this data for over a year.

    We have just found however, that sometimes, the ReadXML method is returning different results than if we simply paste the generated URL request in a browser. The pasted URL in a browser will return 1 record, but the ReadXML method returns 0 records. I have gone through the code with a fine tooth comb, and stepped thru relentlessly. The ReadXML method returns totalRecords = 0, but the browser URL returns 1. I have checked and double check to see if the generated URL is indeed the exact same URL that I am using to navigate to, and it is. The one we are having a problem with is: http://api.amp.active.com/search?v=xml&num=50&m=meta:mediaType=Event+meta:channel=running+OR+meta:channel=triathlon+OR+meta:channel=duathlon+meta:startDate:daterange:3/3/2012..3/3/2012&l=NC&api_key=p67tv5bbfwawgvj5st4mjuze

    I know its a long shot, but is there anything on your end that can explain why reading this xml from 2 different places yields 2 different results? Its not like this problem happens everywhere, its rare. If it were happening all the time, then I'd come to the conclusion that there is something wrong with my code. But when it works fine 99% of the time, and this is one that doesn't, I was hoping that maybe you could help. I am stumped.

    Most of the time, what we can navigate to in a browser produces the same results as the ReadXML method in the program. This example above consistently fails for us however.

    Message edited by MaryF 12 years ago

  1. active Admin12 years ago

    Hey Mary,

    Apologies for the late response. This is the first I've heard of an issue like this. To help debug, are you getting a different HTTP response code when you encounter the bug? It's possible you're hitting your throttle limit during these occurrences and are getting a 403 returned.

  2. MaryF12 years ago

    I am finding differences more and more between what I get back thru asp.net, and what I see if I just put the same URL into a browser. I am not getting a 403 error, I am getting an xml feed, but it is different when called by 2 methods. I have absolutely no idea why.

    Here is an example: I am trying to get a list of all events, where the channel is Running or Triathlon or Duathlon, for North Carolina, on March 3, 2012. When I generate the URL, and plug it into a browser, I see one event: assetName = Rumba on the Lumber, in Lumberton, NC.

    When I use this exact URL in a DataSet.ReadXML method, I get one event: assetName: Southern Village 5K, Chapel Hill, NC.

    Can you check on your end if either of these events, or both, should be included in this search? The URL I am using in both places is: http://api.amp.active.com/search?v=xml&num=50&m=meta:mediaType=Event+meta:channel=running+OR+meta:channel=triathlon+OR+meta:channel=duathlon+meta:startDate:daterange:3/3/2012..3/3/2012&l=NC&api_key=p67tv5bbfwawgvj5st4mjuze

  3. MaryF12 years ago

    Here's the xml returned when I use the DataSet.ReadXML method:

    <?xml version="1.0" standalone="yes" ?> - <search> <time>0.025041</time> <totalResults>1</totalResults> <fromNum>1</fromNum> <toNum>1</toNum> <page>1</page> - <results> - <result> <num>1</num> <mime /> <url>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=chapel-hill-nc&3=southern-village-5k-2011&cmp=10-2</url> <url_encoded>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=chapel-hill-nc&3=southern-village-5k-2011&cmp=10-2</url_encoded> <title>Southern Village 5K | Chapel Hill, North <b>Carolina</b> 27516 <b>...</b></title> <language>en</language> <abstract /> - <meta> <location>Weaver Street Market</location> <activeAdvantage>true</activeAdvantage> <endDate>2011-11-13</endDate> <lastModifiedDateTime>2011-06-14 20:59:53.347</lastModifiedDateTime> <endTime>14:00:00</endTime> <city>Chapel Hill</city> <startTime>14:00:00</startTime> <eventId>1967083</eventId> <longitude>-79.0655783</longitude> <substitutionUrl>1967083</substitutionUrl> <sortDate>2001-11-13</sortDate> <dma>Raleigh - Durham (Fayetteville)</dma> <seourl>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=chapel-hill-nc&3=southern-village-5k-2011&cmp=10-2</seourl> <country>United States</country> <category>Activities</category> <market>Raleigh - Durham (Fayetteville)</market> <assetTypeId>EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65</assetTypeId> <contactName>Deborah Rodgers</contactName> <UpdateDateTime>9/23/2011 9:47:07 AM</UpdateDateTime> <latitude>35.8797065</latitude> <startDate>2011-11-13</startDate> <state>North Carolina</state> <estParticipants>300</estParticipants> <assetId>1242f6b5-597f-432e-a8be-178e71cee7d4</assetId> <participationCriteria>Family</participationCriteria> <onlineDonationAvailable>0</onlineDonationAvailable> <assetName>Southern Village 5K</assetName> <eventURL>http://www.sv5k.com</eventURL> <zip>27516</zip> <contactPhone>919-225-8546</contactPhone> <contactEmail>sv5k@chapelhillserviceleague.org</contactEmail> <onlineMembershipAvailable>0</onlineMembershipAvailable> <trackbackurl>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=chapel-hill-nc&3=southern-village-5k-2011&cmp=10-2</trackbackurl> <onlineRegistrationAvailable>true</onlineRegistrationAvailable> <image1>http://www.active.com/images/events/hotrace.gif</image1> <address>716 Market Street</address> <lastModifiedDate>2011-06-14</lastModifiedDate> - <tag> <value>event:10</value> <value>Running:10</value> </tag> - <splitMediaType> <value>Event</value> <value>1 mile</value> <value>5K</value> <value>=difficulty:Beginner</value> </splitMediaType> - <mediaType> <value>Event</value> <value>Event\1 mile</value> <value>Event\5K</value> <value>=difficulty:Beginner</value> </mediaType> - <channel> <value>Running</value> <value>Walking</value> </channel> </meta> </result> </results> </search>

  4. MaryF12 years ago

    Here's what I see when I put the exact same URL into a browser: <?xml version="1.0" encoding="UTF-8" ?> - <search> <time>0.019057</time> <totalResults>1</totalResults> <fromNum>1</fromNum> <toNum>1</toNum> <page>1</page> - <results> - <result> <num>1</num> <mime /> <url>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=lumberton-nc&3=rumba-on-the-lumber-2012&cmp=10-2</url> <url_encoded>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=lumberton-nc&3=rumba-on-the-lumber-2012&cmp=10-2</url_encoded> <title>Rumba on the Lumber | Lumberton, North <b>Carolina</b> 28358 <b>...</b></title> <language>en</language> <abstract /> - <meta> <summary>Flat, Fast & Fun.Come for the 5k, stay for the LARGEST Chili cook-off in NC and the FREE Kidz Zone.</summary> <location>Historic Downtown Lumberton, NC</location> - <tag> <value>event:10</value> <value>Green:10</value> <value>Running:10</value> </tag> <activeAdvantage>true</activeAdvantage> <endDate>2012-03-03</endDate> - <splitMediaType> <value>Event</value> <value>1 mile</value> <value>5K</value> </splitMediaType> <lastModifiedDateTime>2011-10-21 17:13:37.837</lastModifiedDateTime> <endTime>11:00:00</endTime> <city>Lumberton</city> <startTime>11:00:00</startTime> <eventId>1992727</eventId> <longitude>-79.0086235</longitude> <substitutionUrl>1992727</substitutionUrl> <sortDate>2002-03-03</sortDate> <dma>Florence - Myrtle Beach</dma> <seourl>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=lumberton-nc&3=rumba-on-the-lumber-2012&cmp=10-2</seourl> <country>United States</country> <category>Activities</category> <market>Florence - Myrtle Beach</market> <assetTypeId>EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65</assetTypeId> <contactName>Scott Billingsley</contactName> <UpdateDateTime>9/23/2011 9:47:07 AM</UpdateDateTime> <latitude>34.6186733</latitude> <startDate>2012-03-03</startDate> <state>North Carolina</state> - <mediaType> <value>Event</value> <value>Event\1 mile</value> <value>Event\5K</value> </mediaType> <estParticipants>500</estParticipants> <assetId>6adbf653-7745-41a2-9122-c18ebda1bd0b</assetId> <participationCriteria>All</participationCriteria> <onlineDonationAvailable>0</onlineDonationAvailable> <assetName>Rumba on the Lumber</assetName> <eventURL>http://www.robesonroadrunners.com</eventURL> <zip>28358</zip> <contactPhone>910-521-6807</contactPhone> <contactEmail>scott.billingsley@gmail.com</contactEmail> <onlineMembershipAvailable>0</onlineMembershipAvailable> <trackbackurl>http://www.tantracking.com/click.track?CID=141770&AFID=156210&1=running&2=lumberton-nc&3=rumba-on-the-lumber-2012&cmp=10-2</trackbackurl> <onlineRegistrationAvailable>true</onlineRegistrationAvailable> <image1>http://www.active.com/images/events/hotrace.gif</image1> <address>Corner of 3rd Street & Elm Street</address> <lastModifiedDate>2011-10-21</lastModifiedDate> - <channel> <value>Running</value> <value>Walking</value> </channel> </meta> </result> </results> </search>

  5. MaryF12 years ago

    I am not sure if you did something on your end, but this morning, I am now getting the same results with both methods of accessing the XML feed.

  6. MaryF12 years ago

    We still have weird things happening. I am still trying to pinpoint exactly what is going on.

  7. active Admin12 years ago

    Hey Mary,

    This is linked to a caching issue on our end. We're working to resolve the issue now. It should be fixed by tomorrow.

  8. MaryF12 years ago

    This is happening again. The results I get when I consume the XML feed programmatically are very different from the results that I get when I simply click on the exact same URL that generated the feed.

  9. jarredd12 years ago

    Hello Mary,

    Can you please send some examples so we can test and troubleshoot?

    Thanks!

    Jarred

    Technical Account Manager, Active Network

  10. jarredd12 years ago

    Hi Mary,

    Just checking in to see if you are still experiencing any issues with the API...

    Best,

    Jarred

    Technical Account Manager, ACTIVE Network

  11. MaryF12 years ago

    I have found a work-around for this.

[ Page 1 of 1 ]