The spec., Sec. 4.2.1, item 6, says:
Else if a suitable data handler can be found using the JavaBeans Activation Framework then use
it to map the entity body to the desired Java type.
From this, I assume, any Java type is a valid return type:
the jafds works fine. But jaf does not work. The log contains:
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class WeirdClass, and Java type class WeirdClass, and MIME media type application/octet-stream was not found.
I assume Jersey should use JAF even for all Java classes, not only DataSource, and do something like: