users@jsr311.java.net

Accept and exception mapper response entities

From: Sergey Beryozkin <sberyozk_at_progress.com>
Date: Thu, 5 Mar 2009 13:22:25 -0000

Hi

Consider this Accept value :

Accept : application/octet-stream


Suppose the method being invoked throws a custom exception which is then mapped to a response. This response might contain an entity which is nor necessarily serializable into an application/octet-stream format. For ex, an exception mapper might choose to reply with a text/plain message.

In such cases, is it reasonable to expect that the JAXRS runtime should serialize such a text/plain message (if the right provider is available), despite the fact only application/octet-stream is accepted ?

Thanks, Sergey