+

Search Tips   |   Advanced Search

Use 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, we can represent requests and responses by JAXB annotated objects.

JAXB maps Java classes and an XML schema. JAXB uses 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.

  1. Configure the development environment.

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


Subtopics


Related tasks

  • Implement a resource method using JAXB objects for XML content

  • Web services specifications and APIs