title: How to return RSS with REST service?
body: <p>I'm using <a href="https://github.com/rometools/rome" rel="nofollow">ROME</a> for RSS feed generating and Jersey as REST service.</p>
  
  <p>Here is my RSS feed generation.</p>
  
  <pre><code>public SyndFeed generate()
  {
      SyndFeed feed = new SyndFeedImpl();
      feed.setFeedType( "rss_2.0" );
      feed.setTitle( "My Site" );
      feed.setLink("http://example.com");
      feed.setDescription("Test Site.");
  
      List&lt;SyndEntry&gt; entries = new ArrayList&lt;SyndEntry&gt;();
      SyndEntry entry = null;
      SyndContent description = null;
  
      entry = new SyndEntryImpl();
      entry.setTitle( "Entry1" );
      entry.setLink( "http://example.com/entry1" );
      entry.setPublishedDate( new Date() );
  
      description = new SyndContentImpl();
      description.setType("text/html");
      description.setValue( "This is the content of entry 1." );
      entry.setDescription( description );
  
      entries.add( entry );
      feed.setEntries(entries);
  
      return feed;
  }
  </code></pre>
  
  <p>And method of getting the feed</p>
  
  <pre><code>@GET
  @Path("/getFeed")
  @Produces(MediaType.APPLICATION_XML)
  public SyndFeed getFeed()
  {
      RSSFeed rssFeed = new RSSFeed ();
      return rssFeed.generate();
  }
  </code></pre>
  
  <p>I'm getting an error for incompatible type for body writer. How could make service to return XML with the feed?</p>