|
From: Brock L. <b....@sb...> - 2011-01-14 03:18:13
|
> > I have been using Rest-Easy for about 6 months -- it is a very nice tool. > > I just did hit a snag however. > > I am using the RestEasy Standard Atom provider, but it produces feeds that can not be consumed by standard readers like FeedReader and FeedBurner. > > Basically the problem I believe is that RestEasy uses tags like <atom:id> which have the atom namespace defined in the standard XML format -- but the readers aren't that smart and they are expecting tags like <id>. (see examples below) > > Thanks for any suggestions -- and thanks again for RestEasy! > > Brock. > > Here is part of my POM for RestEasy > > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-jaxrs</artifactId> > <version>1.2.1.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-jaxb-provider</artifactId> > <version>1.2.1.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-atom-provider</artifactId> > <version>1.2.1.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-jettison-provider</artifactId> > <version>1.2.1.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-multipart-provider</artifactId> > <version>1.2.1.GA</version> > </dependency> > > Here is an example of what RestEasy would produce for an Atom feed > > <atom:feed xmlns:atom="http://www.w3.org/2005/Atom"> > > <atom:title>Example Feed</atom:title> > <atom:link href="http://example.org/"/> > <atom:updated>2003-12-13T18:30:02Z</atom:updated> > <atom:author> > <atom:name>John Doe</atom:name> > </atom:author> > <atom:id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</atom:id> > > <atom:entry> > <atom:title>Atom-Powered Robots Run Amok</atom:title> > <atom:link href="http://example.org/2003/12/13/atom03"/> > <atom:id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</atom:id> > <atom:updated>2003-12-13T18:30:02Z</atom:updated> > <atom:summary>Some text.</atom:summary> > </atom:entry> > > </atom:feed> > > Here is an example of what the standard atom readers want: > > <?xml version="1.0" encoding="utf-8"?> > <feed xmlns="http://www.w3.org/2005/Atom"> > > <title>Example Feed</title> > <link href="http://example.org/"/> > <updated>2003-12-13T18:30:02Z</updated> > <author> > <name>John Doe</name> > </author> > <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> > > <entry> > <title>Atom-Powered Robots Run Amok</title> > <link href="http://example.org/2003/12/13/atom03"/> > <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> > <updated>2003-12-13T18:30:02Z</updated> > <summary>Some text.</summary> > </entry> > > </feed> > |