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

XML is a common media format that RESTful services consume and produce. To deserialize and serialize XML, you can represent requests and responses by Java™ Architecture for XML Binding (JAXB) annotated objects.

About this task

JAXB a Java technology that provides an easy and convenient way to map Java classes and an XML schema for simplified development of Web services. JAXB leverages the flexibility of platform-neutral XML data in Java applications to bind an XML schema to Java applications without requiring extensive knowledge of XML programming.

This task describes how to use JAXB to deserialize and serialize XML content.

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 a resource method using JAXB objects for XML content.
  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 XML content for requests and responses.




Related tasks
Implementing a resource method using JAXB objects for XML content
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_xmlcontent.html