> Hi: Gurus, I would like to know what would be the default media type
> in jersey if client doesn’t provide one with the client call.
>
> Second what is the best design pattern to return multiple data
> format on the basis of the client request call.
>
> E.g lets say I have to return xml, JSON, csv etc formats on the
> basis of the call coming from the client like this
>
> http://localhost:8084/Rootcontext/resourceName/{id.xml} //Return xml
> http://localhost:8084/Rootcontext/resourceName/{id.json} //Return json
> http://localhost:8084/Rootcontext/resourceName/{id.csv} //Return csv
>
> I am not sure how to call different resource methods that produces
> different data format
>
> @Produces({MediaType.APPLICATION_JSON})
>
> @Produces({MediaType.APPLICATION_XML})
>
> @Produces({MediaType.TEXT_XML})
>
> Any help would be really appreciated.
>
> Regards,
> RJ
>
>