[prev in list] [next in list] [prev in thread] [next in thread]
List: wink-dev
Subject: Response Media Type and MBW
From: Reto_Bachmann-Gmür <reto () apache ! org>
Date: 2011-10-04 9:47:28
Message-ID: CALvhUEWh1D1UV01DDsUP8HcxD--OOZWpiDLN4BGBRgB1-msoiA () mail ! gmail ! com
[Download RAW message or body]
Hello,
I'm having a problem with content negotiation and MessageBodyWriters.
If my resource method has no @Produces annotation (or the equivalent
@Produces("*/*") and I request the resource with the accept header set
to text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
(firefox default) my message body writer that supports various rdf
formats (thus matching */*) isn't used and an HTTP 500 response is
answered.
If I set my accept header to a concrete rdf type or if I add an
@Produces annotation to the resource method the message body writer is
used correctly.
It seems that wink determines the media-type before looking at the
available MessageBodyWriters. Is there a particular reason to pass a
single media-type to FlushResultHandler or could we pass all
mediatypes (ordered by priority) that are acceptable and that match
the @Produces annotation of the method?
Cheers,
Reto
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic