i have a large no of methods written for returning the XML type data, and repeating the code for all the methods just because of a different type of data conversion doesn't look good to me.
Because after some other time, a different content type requirement might come, and i dont want to rewrite all the methods just because the content type is different(unless the business logic requires some different processing for different content type)
So, what i am having right now, is that i get my data object from the backend to the jersey servlet and then based on the request parameter convert it to either JSON or XML(and that code is common).
Also, it looks like with Jersey, we can specify 2 or more content types for the same method, and that seems to be ok for what i am trying to do.
Thank you