...
- #1) Consuming Atom Documents
- #2) a) Producing Atom Documents
- #2) b) Producing Atom Documents Using Apache Wink - the JAX-RS Wayway
- #3) Consuming RSS Documents
- #4) Producing RSS Documents
- #5) Writing Atom Publishing Protocol (APP) Server
- #6) Writing Atom Publishing Protocol (APP) Client
...
Apache Wink - Click on links to Download - ProduceAtomUsingWink.java ProduceAtomUsingWink_web.xml | ||
---|---|---|
| ||
2) b) Producing Atom Documents
...
- the JAX-RS
...
way
A more elegant way of producing Atom documents using Apache Wink is In order to produce an Atom document according to the JAX-RS specification using Apache Wink perform the following stepsway as described below:
- Open the Eclipse development environment and then create a "Dynamic Web Project".
- Add Apache Wink & its dependent JARs into Java Build Path and under Java EE Module Dependencies.
- Create a POJO class and a method that creates Atom feed document. Annotate the class & its methods with the required JAX-RS annotations as below:
ProduceAtom.java - Add org.apache.wink.server.internal.servlet.RestServlet into web.xml and specify the path of above Resource class in it's init-param.
See ProduceAtomWinkElegant_web.xml and application - Deploy the web-application and access it using the url http://localhost:8080/ProduceAtom_Wink_Elegant/rest/getAtom
- Final WAR -> ProduceAtom_Wink_Elegant.zip (add Wink & its dependent JARs under ProduceAtom_Wink_Elegant\WEB-INF\lib and re-zip it as WAR).
...