I have a restful web service resource for which I've defined both XML and HTML methods. For desktop browsers the service accurately produces HTML, and for the Android client I've written it accurately produces XML.
When it comes to mobile browsers however, the service produces XML, where it should produce HTML.
One method is annotated with
@Produces({MediaType.TEXT_HTML}) And the other with
@Produces({MediaType.APPLICATION_XML}) Do I need to look at more than the Accept header to get the desired result?
Update: The acceptable media types, intercepted from the mobile browser request, are:
INFO: application/xml
INFO: application/xhtml+xml
INFO: image/png
INFO: text/html; q=0.9
INFO: text/plain; q=0.8
INFO: /; q=0.5