Thank you for visiting cavemonkey50.com. If you're looking for new content, cavemonkey50.com is no longer actively updated. I now maintain a new blog over at ronaldheft.com. I hope to see you there!

SoC: AtomPub Week 2 Status

While I didn’t blog about last week’s status, significant progress has been made in parsing TypePad and Movable Type AtomPub feeds (well, parsing TypePad feeds). This week started off by completing more research on the AtomPub spec. In order to parse an AtomPub feed, I had to learn about X-WSSE authentication. From there, I found a great X-WSSE class that I included in my test version of WordPress. Then, the fun began.

Movable Type Hates Me

Almost immediately, I was retrieving the RAW XML of TypePad’s AtomPub feed. Unfortunately, I could not say the same for Movable Type. Due to some server configuration issues on my end or possibly a bug in Movable Type, I am unable to retrieve Movable Type AtomPub feeds at the moment. I’ve tried various methods of parsing the feed and each method returns the same cryptographic error message. I’ve called in the experts (my mentor, Lloyd) to help me, but if anyone has any clue as to why Movable Type hates me, I would appreciate the feedback.


Parsing the Feed

Regardless of the error, I kept on trucking with the TypePad AtomPub feed, knowing that Movable Type will fall in line once I can figure out my retrieval problems. Working with TypePad’s feed, I started trying different methods of Atom parsing. I first tried WordPress’ built in Magpie parser, but due to Magpie not supporting Atom 1.0, that was little help. I then tried some code snippets on php.net, but unfortunately none of the snippets parsed in the manner I required. So, I started writing my own basic XML parser.

That’s where I stand today. This coming week I will continue writing my custom XML parser, completing the parser by the end of next week. The goal is to have all AtomPub data in array, so I certainly have my work cut out for me.

7 Comments

  1. 1 Joseph Scott on Jun 6, 2008 at 11:51 pm:

    Have you tried SimplePie for ATOM parsing?

    http://simplepie.org/

  2. 2 Ronald Heft on Jun 7, 2008 at 1:02 am:

    Yes, I’m well aware of SimplePie. However, it has been discussed in the past amongst WordPress developers that SimplePie should not be included in core. Regardless, writing a custom parser should be fairly straightforward, and will take less space than the whole SimplePie library.

  3. 3 Toru on Jun 19, 2008 at 5:27 am:

    Hi!

    Actually, if you are using AtomPub, correct endpoint is

    /mt-atom.cgi/1.0

    Not

    /mt-atom.cgi/weblog

    So, in your case,
    http://mt.cavemonkey50.com/mt/mt-atom.cgi/1.0

    And “the same cryptographic error message” seems to be a bug in MT. It suppors to display an error message such as invalid login.

  4. 4 Ronald Heft on Jun 19, 2008 at 8:45 am:

    Toru, if that is the correct endpoint, then Movable Type is advertising the wrong URI in the RSD. Regardless, I’ll try the URI you suggested and see if it makes any difference.

  5. 5 Ronald Heft on Jun 19, 2008 at 11:30 am:

    There was no difference in using that URI. Have you been successful in using MT’s Atom API?

  6. 6 Toru on Jun 20, 2008 at 2:17 am:

    I haven’t tested MT since I did the last time.
    http://www.witha.jp/eXeries/2008/02/17/movable-type-41-and-atompub/

    MT4.1 supports (kind of..) 2 kinds of AtomAPI. One was the old pre-draft version of AtomAPI, and another was the IETF’s AtomPub. That’s why MT4.1 had 2 endpoints. It took me a while to figure this out.

    Anyway, the SixApart dev team told me that they’re gonna overhaul the code for the API like I posted to the blog.

  7. 7 Ronald Heft on Jun 21, 2008 at 12:00 am:

    Well, Toru, unfortunately the different endpoint made no difference. I’m still not able to pass authentication, even using the special API password. Do you know if MT is doing anything special outside of the traditional WSSE base64-encoded SHA1 hash password?

One Trackback/Pingback

  1. SoC: Week 3 Status · cavemonkey50.com
    on Jun 13, 2008 at 10:42 pm

    [...] started the week off by writing the custom XML parser I talked about last week. To do this, I researched several different methods for utilizing PHP’s xml_parse function. [...]