Details
-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
3.0.24.Final
-
None
Description
Annotating a REST method in a javax.ws.rs.@Path-annotated class with @Stylesheet or @XmlHeader will add the header to an XML response produced by that method.
However, annotating a JAX-RS ExceptionMapper class or its toResponse method with @Stylesheet or @XmlHeader appears to have no effect.
It would be convenient and consistent for @XmlHeader and @Stylesheet to also work on ExceptionMapper s.
A workaround is to annotate the Exception class instead, but that seems wrong from an architectural point of view: an Exception class should have no knowledge about how it is serialized to XML, let alone the details of individual XML directives added to the XML output.