Hi
On 29/11/11 01:19, douglassparker wrote:
If a server method is annotated with @Produces( {MediaType.APPLICATION_JSON,
MediaType.APPLICATION_XML} ) and the client does not provide an Accept
Header, my understanding is that the response MIME type should default to
the FIRST Mime type listed, JSON in this case. (I believe Jersey works like
this.) But it doesn't. It defaults to XML. Isn't this a violation of the
spec?
Are you talking about the CXF server side choosing JSON in this case ? I
don't think the spec says anything at all about what to offer in case of
a missing Accept type, if a client does not mind then given that the
server says it can serve either JSON or XML, then it means both formats
are perfectly fine in case of a missing Accept
Sergey
--
View this message in context:
http://cxf.547215.n5.nabble.com/Why-is-the-default-accept-for-WebClient-text-xml-tp5013707p5030783.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com