Map Using Atom content in JAX-RS application requests and responses

You can use the Atom Syndication Format (Atom) to format Web feeds, which communicate news and updates of episodic information on Web sites. Using Atom content in JAX-RS applications, you can take advantage of Web content syndication that provides the same decentralized, dynamic mechanisms for adding new metadata and content supported by RSS, but does so in a way that helps protect core interoperability between implementations.

About this task

Atom is an XML-based document format that describes lists of related information known as feeds. Feeds are composed of a number of items, known as entries, each with an extensible set of attached metadata. For example, each entry has a title. The primary use for Atom format is the syndication of Web content such as weblogs and news headlines to Web sites, as well as publishing content directly to user agents.

The IBM® JAX-RS library provides two methods for consuming and producing Atom feeds and Atom entries in a JAX-RS application.

The first method is a JAXB Atom model that is included in the org.apache.wink.common.model.atom and org.apache.wink.common.model.synd Java packages in the Apache Wink-based IBM JAX-RS library JAR. An application can use classes such as a JAXB annotated org.apache.wink.common.model.atom.AtomFeed to read and write ATOM feeds.

Best practice Best practice: Because the Atom JAXB-based model uses the standard JAXB entity provider and is based on the JAXB API which might be more familiar, use the JAXB Atom model when you need to process Atom documents in JAX-RS.bprac

You can also choose to use the Apache Abdera library, which is provided in the Feature Pack for Web 2.0, to implement Atom content for requests and responses.

Procedure

  1. Configure the development environment.
  2. Define the resources in JAX-RS Web applications.
  3. Configure the web.xml file for the JAX-RS application.
  4. Implement ATOM content for requests and responses.
  5. Assemble JAX-RS Web applications.
  6. Deploy JAX-RS Web applications.

Results

You have developed and deployed a JAX-RS Web application on the application server that uses Atom content for requests and responses.




Related tasks
Using the JAXB-based Atom model for requests and responses
Using the Apache Abdera Atom model for requests and responses
Related reference
Web services specifications and APIs


Terms of Use | Feedback

Last updated: Feb 19, 2011 8:23:11 AM CST
File name: ae/twbs_jaxrs_atomcontent.html