Archive for ROME

ROME 0.9 released

Dave has done some great work getting the ROME 0.9 release out. There's also a new release of the ROME Fetcher.

I did an interesting fix for an ROME XML based security vulnerability in this release. I plan to blog about it in some depth later, but for the moment it's fair to say that the problem is somewhat obscure, but you probably should upgrade if you care about security. I also submitted patches to fix the same problem in Jakarta FeedParser, and Kevin's Tailrank version of FeedParser. A quick code inspection indicated that Informa is probably vulnerable, too, but I haven't got around to doing a patch for that.

Nelson (who pointed this out to us) has said about 3/4 of the XML applications he's encounted are vulnerable to this problem. After the lengths I had to go to fix it I'm not surprised - insecure by design is how I'd describe the XML APIs.

Comments

ROME 0.8 released

ROME 0.8 is out, with Atom 1.0 support.

We had a lot of help with this release from a whole set of new contributors, which is great. It is excellent to see the number of people who use ROME and are prepared to help out when required. P@ has more details.

Comments

ROME 0.7 released

ROME 0.7 is released. This release includes features to improve parsing of non-standard complient date formats.

There is a new release of the ROME Fetcher, too. This includes a bug fix for a URL Connection leak.

If you are doing work with any syndication formats over HTTP in Java, then you should be using ROME and the ROME Fetcher.

ROME Logo

Comments (2)

ROME sightings

A couple of new, very impressive ROME apps have been announced over the last few days.

Firstly, there was OpenVision TV's new I/ON Internet Video Console, which looks to be a very nice movie player that allows you to subscibe to movie channels.

Secondly, it was announced that the Beta My AOL feeds uses ROME. Currently the UI for this seems to be a little buggy (I can't add a new feed to it for instance), but when it works it is really, really good. Without a doubt it is a better aggregator than Google's iGoogle page or Yahoo's MyYahoo (which are both really only suitable for traditional news headlines). It would be better to compare it with MSN's Start.com, which is actually usable as a proper aggregator.

Comments

Delta-Encoded Feed Support in Rome

The Rome Fetcher now supports RFC3229 Delta-Encoded feeds (in CVS). The Rome Fetcher already supports GZipped feeds and conditional get. Hopefully, this additional feature should ease the burden on syndication client authors.

There are test cases in CVS, but I have failed to find any real world servers to test the delta-encoding support against, so any stories of succesful use (because obviously there could not possibly be any bugs…) would be appreciated.

Comments

Retrieving GMail Atom feed with Rome

Those of you with a GMail account might like this. It retrieves the GMail
Atom feed of you inbox status using the Rome Syndication libraries (Grab Rome 0.4 and Rome Fetcher 0.4 from http://rome.dev.java.net). You'll need to edit the BasicAuthenticator
class to set your username and password.

Gmail currently doesn't support conditional-gets or ETags, so unfortunately
it has to retrieve the entire feed each time.

public class Main {
	public static void main(String args[] ) throws IllegalArgumentException,
	MalformedURLException, IOException, FeedException, FetcherException {
		FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
		FeedFetcher fetcher = new HttpURLFeedFetcher(feedInfoCache);
		java.net.Authenticator.setDefault(new BasicAuthenticator()); // turn on authentication
		SyndFeed feed = fetcher.retrieveFeed(new URL("https://gmail.google.com/gmail/feed/atom"));
		System.out.println(feed.getTitle());
		int feedSize = feed.getEntries().size();
		System.out.println("Contains " + feedSize + " items");
		for (Iterator iter = feed.getEntries().iterator(); iter.hasNext(); )
		{
			SyndEntry entry = (SyndEntry) iter.next();
			System.out.println(entry.getTitle());
			System.out.println("\t excerpt: " +
					entry.getDescription().getValue());
		}
		while (true) {
			try {
				Thread.sleep(1000 * 60 * 10); // check every 10 minutes
			} catch (InterruptedException e) {
				// ignore } System.err.print("Retrieving..");
				feed = fetcher.retrieveFeed(new
						URL("https://gmail.google.com/gmail/feed/atom"));
				System.err.println("Done.");
				int newFeedSize = feed.getEntries().size();
				// note that this won't detect new items if the feed size is at maximum
				if (feedSize != newFeedSize) {
					System.out.println("New messages detected. There are now " +
							newFeedSize + " items");
					int itemsToShow = newFeedSize - feedSize;
					int count = 0;
					for (Iterator iter = feed.getEntries().iterator();
					iter.hasNext();) {
						SyndEntry entry = (SyndEntry) iter.next();
						System.out.println(entry.getTitle());
						System.out.println("\t excerpt: " +
								entry.getDescription().getValue());
						count++;
						if (count >= itemsToShow) {
							break;
						}
					}
					feedSize = newFeedSize;
				}
			}
		}
		static class BasicAuthenticator extends Authenticator {
			/**
			 * @see java.net.Authenticator#getPasswordAuthentication()
			 */
			protected PasswordAuthentication getPasswordAuthentication() {
				if ("gmail.google.com".equals(getRequestingHost())) {
					return new PasswordAuthentication("user.name", "password".toCharArray());
				} else {
					return null;
				}
			}
		}
	}

Comments

Rome 0.4 Release

As Alejandro mentioned Rome 0.4 is ready to go.

The Rome Fetcher subproject now includes an implementation using the Apache HTTP Client.

Comments

Dave on Rome

Dave Johnson has a written a good overview of how Rome hangs together. Read it along with the tutorials on the Rome Wiki.

Comments

Rome Fetcher

The 0.3 release of the Rome Syndication Library marks the first release of the
Rome Fetcher.

This library provides a simple but useful implementation of a HTTP fetcher for RSS/Atom feeds. It supports
HTTP conditional gets (ie: last modified and ETag handling),
and enables users to follow the Atom aggregator behaviour recommendations.

As has been
noted
over the
last couple
of days syndication clients often ignore the finer points of feed retrieval. The Rome
Fetcher is designed to do the right thing in the simplest way possible.

It comes with a decent set of test cases (using an embedded Jetty instance) - although they are currently disabled as they crash Maven (I believe this is a Maven bug).

The other big selling point is that in introduces no new libraries above the requirements used by Rome (ie, JDom beta 10).

Comments

Rome HTTP Fetcher

As Pat
mentioned, I've done a http fetching library for Rome. It is now
checked in and available.

It supports HTTP conditional gets
(ie: last modified and ETag handling) and GZip encoded feeds.
It should enable user to write aggregators that follow the
Atom aggregator behaviour recommendations.

Some docs are available (although
this will probably move).

If you are interested, please give it a go and report issues on the Wiki or on the Rome dev mailing list.

Comments