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.
- Configure the development environment.
- Define resources in JAX-RS web applications.
- Configure the JAX-RS application.
- Implement a resource method using JAXB objects for XML content.
- Assemble JAX-RS web applications.
- 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
- Configure the development environment.
- Define resources in JAX-RS web applications.
- Configure the JAX-RS application.
- Implement a resource method using JAXB objects for XML content.
- Assemble JAX-RS web applications.
- Deploy JAX-RS web applications.
Related tasks
Implement a resource method using JAXB objects for XML content
Web services specifications and APIs