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 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.




In this information ...


(Index)

IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.



Terms of Use | Feedback

Last updated: Sep 19, 2011 4:14:10 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-dist&topic=twbs_jaxrs_xmlcontent
File name: twbs_jaxrs_xmlcontent.html