e mërkurë shtator 29, 2004 Weblog servers often provide a user interface to post to your weblog, aften a textarea where you type in your text, a combobox to select a category, and a post button. In the best user interfaces, when you have a decently recent browser they provide you with a rich text editor around the textarea, for WYSIWYG editing of your post. But over the years servers have exposed remote APIs that let a client, be it a desktop application, a cell phone or a backend system agent, post to a weblog.
The problem is that most people don't know how to configure these clients when they find one. In this article I will explain how to configure a desktop client to post to a MetaWeblog API server such as Roller, using blogs.sun.com as an example.
Using a blogging client with Roller, on the Roller user's guide wiki does a good job at explaining how to configure a MetaWeblog API desktop client to post to Roller.
It uses w:bloggar, a Windows client, which seems to have many features. Unfortunately as explained in A quick history of the weblog posting APIs, MetaWeblog API based clients, and servers, vary in quality of implementation, depth of configuration they offer, and the wiki documentation doesn't make clear what is the minimum set of common attributes that you need to set in most of these clients. Moreover the "spec" is not as rigorous as W3C, OASIS or IETF specs, and clients and servers often implement it incompletely or interpret it differently.
For example Tektonica MO:BLOG which I use on my Treo phone does implement the metaWeblog.newMediaObject (blogid, username, password, struct) entry point, but does not send the Mime type of the object. Roller 0.9.8.2 which we use now does not implement the newMediaObject method at all (throw new XmlRpcException(UNSUPPORTED_EXCEPTION, UNSUPPORTED_EXCEPTION_MSG);). The code for MetaWeblog API implementation in Roller is borrowed from David Czarnecki's code for the same thing in Blojsom. But Roller used an old version of Blojsom: the current Blojsom implements it correctly. Too correctly for MO:BLOG, so I had to hack and recompile that blojsom class on my server in order to be able to post pictures from my Treo:-(
I don't mind that kind of fooling around with clients and servers. Moreover in order to configure a client, having played with many clients and servers over the past few years, I quickly found out what I needed on the wiki page to configure NetNewsWire, Ecto, and Tektonica MO:BLOG to post to Roller on blogs.sun.com. But I understand that it is not clear to many of my Sun colleagues who have started blogging since a few months. David Ogren, who has an interesting blog here just asked the question in the sun bloggers list, so I'll try to answer here: How to configure a desktop blog posting client to post to Roller on blogs.sun.com
I will restrict myself to MetaWeblog API based clients for now, until John, Dave and Will install the latest Roller on blogs.sun.com and we can dump this API to finally use Atom.
Please read A quick history of the weblog posting APIs first in order to get some context (I try to slowly build a knowledge base here, post by post:-)).
Looking at the MetaWeblog API specification, you can see that all calls have 4 elements in common: blogid, username, password and a struct (looks Cish isn't it?-). The struct is specific to each call, but the 3 other parameters are what you need to minimally provide to your client. Username and password are self explanatory. Blogid is there because on many systems, such as MovableType, you can have many different weblogs for a single user. In Roller userid and blogid are the same. If you want another weblog just create another user. Then because the MetaWeblog API specification is an XML-RPC API, you need a url to post your call to.
To summarize, all MetaWeblog API based clients will ask you for 4 pieces of information: username, password, blogid, xmlrpc url. In Roller, and more specifically on blogs.sun.com these will be:
All the rest is details. Some weblog clients propose you a list of server types, in order to customize the parameters they will ask of you. This lets them take advantage of certain specific server features (MovableType, which invented many specifications and features for blogging, has many of these). Roller is rarely in the list. Then just choose MetaWeblog API compatible in the list and it should work fine.
When using NetNewsWire Pro 1.07 not all features worked well all the time: as I explained servers and clients often differ in how they interpret the specifications, and don't all have perfect error reporting. I remember having had trouble with getting categories, or old posts. I hope Marsedit will have fixed that.
I've used these guidelines for NetNewsWire Pro 1.07 that I used until yesterday, Ecto, MO:BLOG, and Marsedit Beta 1.0 / NetNewsWire 2.0b3 beta that I use since yesterday and find fantastic! This is actually my first post using Marsedit, using the configuration I described above. The editor is really very nice: easy tag list to add classic HTML tags, custom list to add your own, shift-apple-A with a selected text to add a href with the string currently in the clipboard. And it got my previous posts and categories from the server without a hitch. Let's see if posting works...!
Oooops, no, error message, "the server did not respond". Let's try again.... same thing. Marsedit has a nice XML-RPC console, let's try to troubleshoot what happened:
XML-RPC reply received: 2004-09-29 17:29:07 +0200 URL: http://blogs.sun.com/roller/xmlrpc Method name: metaWeblog.newPost Status code: -1 Succeeded: NO --Download Error-- Response text:
OK so Marsedit does not seem to work as well as NetNewsWire 1.07 with Roller 0.9.8.2. I edit this in the Roller UI. What happened is that I tried to post 4 times and got the same error message. But then a few minutes later I realized my posts had been taken into account in the server! So I had 4 duplicates of the same post. Dave Johnson says in an internal email that he is using Marsedit with Roller 0.9.9 and it works fine. Blogs.sun.com should migrate to 0.9.9 soon, so hopefully Marsedit will work better then. In the meantime, either use Ecto or NetNewsWire 1.0.7... or your cell phone! The instructions above are valide for any MetaWeblog API client.
This shows how immature weblog posting software is today: the Atom API specification should make client and servers more interoperable.

Coming next week are posts about Moblogging from a cell phone, and the Atom API: stayed tuned!
( Sht 29 2004, 08:37:45 PD PDT ) Permalink Chat about it
Tagsurf It
e martë shtator 28, 2004 Just tried MobileAtom J2ME that Tim mentioned to me half an hour ago: it works fine!
I was able to modify a post on my blogger weblog, first post from the blogger ui from my Treo... all this while attending a conference call (sorry guys if I felt a bit distracted: I just couldn't resist:-)
I could not test it on my blojsom blog because he hardcoded the destinations to blogger and typepad. I'm on a Mac, the J2ME toolkit has only a windows and linux installer, my VirtualPC partitions are on an external disk at home, so I can't recompile it now. I had tested Russel Beattie's AtomME on blojsom but it did not work. David Czarnecki had posted a fix but I had no time to apply it.
Now we just need to deploy Roller 0.9.9 on blogs.sun.com to get J2ME/Atom powered moblogging here!
Dave, Will, John, when do you guys upgrade?
Nota Bene: Robert Sayre, who wrote MobileAtom, was introduced to me by Tim Bray. He gave me a great tip: Michael Powers created a Darwin/OSX port of the Mobile Information Device Profile (MIDP) Reference Implementation v1.0.3.: see MIDP 1.0.3 for OSX. No need of VirtualPC anymore to do J2ME coding on a Mac! Thank you guys!
( Sht 28 2004, 11:49:16 PD PDT ) Permalink Chat about it
Tagsurf It
e hënë shtator 20, 2004 A little history and explanation of the various weblog posting APIs.
Please feel free to correct me: I've taken the blogging train only in 2002 and have not lived through all the history of this evolution, so some facts stated here may be wrong.
XML-RPC is a 1998 spec by Userland's Dave Winer for RPC in his proprietary content management tool Frontier.
Then Winer worked with Microsoft to spec out SOAP.
In the meantime as blogging got more successful the blogging crowd wanted an API to post to a blog from a client or server tool, wihtout using a HTML form.
Blogger shot first, 8/7/2001,with the Blogger API , a very simple API based on XML-RPC.
Its methods are very simple and limited: get and set some weblog texts.
blogger.newPost: Makes a new post to a designated blog. Optionally, will publish the blog after making the post.
blogger.editPost: Edits a given post. Optionally, will publish the blog after making the edit.
blogger.getUsersBlogs: Returns information on all the blogs a given user is a member of.
blogger.getUserInfo: Authenticates a user and returns basic user info (name, email, userid, etc.).
blogger.getTemplate: Returns the main or archive index template of a given blog.
blogger.setTemplate: Edits the main or archive index template of a given blog.
Then in 3/14/2002 Userland's Dave Winer published the MetaWeblog API, still based on XML-RPC, to address the blogger API shortcomings: from the "spec"
Relationship between MetaWeblog API and the Blogger API
The MetaWeblog API is designed to enhance the Blogger API, which was limited in that it could only get and set the text of weblog posts. By the time MWA was introduced, in spring 2002, many weblog tools had more data stored with each post, and without an API that understood the extra data, content creation and editing tools could not access the data.
At the time of this writing, summer 2003, most popular weblog tools and editors support both the Blogger API and the MetaWeblog API.
Relationship between MetaWeblog API and RSS 2.0
The MetaWeblog API uses an XML-RPC struct to represent a weblog post. Rather than invent a new vocabulary for the metadata of a weblog post, we use the vocabulary for an item in RSS 2.0. So you can refer to a post's title, link and description; or its author, comments, enclosure, guid, etc using the already-familiar names given to those elements in RSS 2.0. Further since RSS 2.0 is extensible, so is the MetaWeblog API. We have designed conventions for representing attributes and namespaces in MWA.
This API was successful and is implemented in most weblog servers (Movable Type, Roller) and clients (Ecto, NetNewsWire Pro).
The main long term additions concern getting recent posts, attaching media files to a post, setting and retrieving categories, and extensibility (sending attributes for post elements, and using namespaces).
But it is tied to RSS 2.0.
David Czarnecki's first comment to this post outlines the variety of ways this spec can be implemented on client or servers, making the use of this spec very experimental: just try a combination of client and server and cross your fingers to see if it will work.
Then in early 2003 Sam Ruby, the intertwingled one (from Apache/IBM), tired of the endless fights between RSS 1.0 and 2.0, started the Atom project (initially Echo) to define a new standard for syndication, including extensibility and APIs.
The spec was designed collaboratively on the Atom Wiki. Tim Bray participated into that, as well as most blogland except Dave Winer who was pushing for RSS 2.0. In spring 2004 Sam Ruby proposed to submit it at the IETF as a standard. The standardization work is in process now and should be finished by the beginning of 2005.
The Atom API follows the REST architectural style (GET, PUT, DELETE, POST) with an option to use SOAP.
It generated a lot of noise and disputes in the blogging community.
Although I did not participate directly, I am personnaly very much in favor of it: I seems like it will be a "real" specification, and its design last time I looked was pretty clean. The problem with the Meta Weblog API is that the specification is open to interpretation and very often clients and servers implement it either incorrectly or using different interpretations, resulting half working solutions and strange error messages. Atom should be more strict, so more straightforward to validate, yielding better interoperability.
It is quite recent and is not implemented in all servers yet, but I'm sure it will. Movable Type supports it, and Google recently chose it for their feeds (Google acquired blogger last year). However when people say they support it, it usually means for generating feeds, not for the publishing API (Movable Type 3.0 implements the Atom API draft). But that will come in due time.
Dave Winer must have felt that because in april he offered the olive branch to try to make RSS 2.0 and Atom converge.
Roller today implements part of the Meta Weblog API (not the newMedia() method so you cannot post pictures), so this is what you need your weblog client to use if you want to post to blogs.sun.com. The code for the Meta Weblog API in Roller comes from David Czarnecki's Blojsom (another nice weblog server in java, that was included in Mac OS X 10.4 server last june) and his latest version includes the newMedia() implementation. We just need to push it in Roller.
Dave Johnson plans to add support for Atom API in Roller. It will probably be based on Lance Lavandowska's Atom4J project.
As usual Mark Pilgrim has the best writeup on this topic: The Atom API
The Roller Wiki has a good set of links for further reading on the topic: WeblogAPIs.
( Sht 20 2004, 04:08:05 MD PDT ) Permalink Comments [9] Chat about it
Tagsurf It
e hënë korrik 05, 2004
).
posted from my treo
Edited further in the Roller UI.
Last month my faithful Treo 180 died, from a predictible death by a hip fracture... sorry by a fracture of the flip top hinge (these models were doomed at birth). Since my wife is pregnant, due in 2 months, I want her to be able to reach me all the time, so I shopped for a new phone.
I've Read Russel's Notebook a bit, bought a few magazines and did some quick research to determine that the so called smartphones are not yet for me. Not smart enough, and for serious use I need a keyboard. It must be a generation issue: I must be part of the last generation who don't have developped the ability to type with 10 digits keyboards:-)
So I went for a Treo 600, which had the advantage of being ready to use with my accumulated agenda and contacts from the past 8 years that I've used Palm devices.
I've used the Treo 180 only as a phone/PDA, sending a few SMSes buth that's it. With the Treo 600 I decided to start playing with the online capabilities of the device. I already tried 2 mail clients but none of them handles IMAP over SSL with my self signed cert powered personal IMAP server. I need to do more search and debug on that.
Then I shopped for a blogging client: my colleague Matt Ingenthron has posted in the internal bloggers mailing list that he has tested mo:blog successfully, so I gave it a try too.
The first 2 lines of this post have been posted from my Treo 600 phone: it works really well.
However I tried the fancy feature which lets you post pictures taken with the Treo's built in camera, using the MetaWeblog API call newMediaObject I suppose... and it failed: my son Simon's picture has not been uploaded to the server.
I did not sniff the http traffic (it goes from my phone operator to blogs.sun.com, I need to test this with my own server, whenever i have time to set it up).
But a quick look at Roller source told me I don't need to go further:
In package org.roller.presentation.xmlrpc
public class MetaWeblogAPIHandler extends BloggerAPIHandler
...
public Object newMediaObject(String blogid, String userid, String password,
Object struct) throws Exception
{
mLogger.info("newMediaObject() Called =[ UNSUPPORTED ]=====");
mLogger.info(" BlogId: " + blogid);
mLogger.info(" UserId: " + userid);
mLogger.info(" Password: " + password);
throw new XmlRpcException(UNSUPPORTED_EXCEPTION,
UNSUPPORTED_EXCEPTION_MSG);
}
I hope the Atom posting API becomes more widespread, on client and servers, because the mishmash of APIs that are used right now make it too difficult for client developers to create clients which work with every servers. Even with the NetNewsWire client I use to post to this Roller powered weblog I have some trouble sometimes.
Until that happens I may give a try to completing the MetaWeblog API implementation for Roller: after all that's not very complicated, there is a directory for resources for each user already, so it's just a matter of Base64 decoding the bits and creating the file with the name specified in the struct.
In Open source Java libraries for Weblogs, Wikis, and Newsfeeds Dave Johnson (Roller creator) wonders:
One question that crossed my mind: should Rome include a blogging client library? Posting, updating, and deleting posts via the XML-RPC based Blogger API or the REST-based Atom API is not exactly easy to do. Wouldn't it be nice to have a client library with an easy-to-use set of interfaces for this.
Rome is the open source java library that Alejandro, Elaine and I have started a month ago to unify Syndication feed parsing in java. I think a posting API to abstract out the various protocols is a good idea as a Rome subproject: we're busy preparing our 0.3 release for now, with unit tests and various subprojects that got started by our new developers, but Dave, feel free to get a Rome subproject started on that.
( Kor 05 2004, 06:02:51 PD PDT ) Permalink Comments [5] Chat about it
Tagsurf It
e martë qershor 08, 2004 I'm not used to so much attention: There's been an OSNews thread about blogs.sun.com: Sun Opens Up with Blogging; Solaris Tidbits.
The night before I had been messing up with my stylesheet in order to prepare for a presentation I have to give soon about advanced Roller use (messing your stylesheet, what an advanced use:-), and left it in a unfinished state: I had set font-size: large for all styles.
I didn't know I would have such an attentive readership: Chris Sears commented about it in the thread 21 inch Sun monitor required to read?. I guess I should use the server on my laptop for that kind of tests!
Thanks for the comment though, Chris.
Now I switched to the Berkeley theme, which I need to customize, but I like the cleanliness of the design.
( Qer 08 2004, 12:37:41 MD PDT ) Permalink Chat about it
Tagsurf It
e hënë qershor 07, 2004 Tucu, alias Alejandro "Portlet" Abdelnur never wanted to blog, but gave it a try when blogs.sun.com was launched.
I'm glad he did: his first post Syndication feeds hell is very well thought out.
It's like the approach has been "It would be nice if when I post a weblog the following happens" instead of being "It would be nice if I can do the following when posting a weblog".
We've been working together on a RSS-Atom-Syndication related project for a few months (more about this soon :-) and he's discovered the oddities of these specs with no schema and weird protocols that are implemented differently by each implementation :-)
The artifact that captures the best this webloggish mentality of "would it be cool if it did this?" is the incredible Lazyweb. It sounds like a joke at first sight but the mechanism is very interesting and I can see some adaptations of this idea when corporate blogging has gone mainstream and people are used to blogs, trackbacks and other features: forget about polls, questionnaires. The product manager of tomorrow will just organize and prioritize a big Syndication feed from his product's Lazyweb's instance.
( Qer 07 2004, 11:01:25 PD PDT ) Permalink Chat about it
Tagsurf It
Tim Bray commented about blogs.sun.com yesterday
Then it seems like IDG started the ball rolling this morning with Sun blogs show uncensored public face.
After the watershed april 7th meeting with Tim Bray and Jonathan Schwartz where we decided we should make it easy for Sun employees to blog, both internally and externally, we had some discussions in the internal bloggers mailing list about how to enable employees to start an external blog.
The 2 options were to have them start their blog on an external hosted system, such as Typepad, and eventually reimburse them for the registration, or host it ourselves and create blogs.sun.com. For the self hosting people were talking about Movable Type or WordPress.
I proposed that we used Roller instead, since it is written in Java, is fully featured, designed for hosting, proven as scalable by Javalobby, and well architected.
I was bracing myself for long discussions, and was really surprised at how fast things happened after these emails: Will Snow, who manages sun.com shot an email saying it was possible to setup Roller on an external server, and John Hoffmann promptly installed it.
In early May I created a small internal app called BURPS (Blogs.sun.com User Roller Provisioning System :-) that lets people which are in Sun's ldap with the roles employee or intern create an account on blogs.sun.com.
It also optionally registers them in an internal mailing list for bloggers.
John also wrote some Apache rewriting rules to let you access weblogs and feed urls in a more friendly way. Roller blog urls are usually like this:
http://blogs.sun.com/roller/page/pat/20040427#blogs_sun_com_is_up
and we want them like this:
http://blogs.sun.com/pat/20040427#blogs_sun_com_is_up
The roller prefix can be gotten rid of in Tomcat by deploying Roller as the default webapp.
But the page prefix is required by Struts (Roller is a Struts app) so you need Apache and mod_rewrite to get rid of it.
The system's been up and running for a month now and it seems today is the big day where they do press releases and stuff.
I've seen already 11 new user registration in the past 3 hours: not an "internal" /. effect yet but encouraging:-)
Let's see how it goes.
( Qer 07 2004, 10:08:47 PD PDT ) Permalink Chat about it
Tagsurf It
| « nëntor 2009 | ||||||
| Die | Hën | Mar | Mër | Enj | Pre | Sht |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | |||||
| Today | ||||||
Today's Page Hits: 163