users@jersey.java.net

[Jersey] Re: Jersey(2.10.4) Entity provider selection algorithm gives less priority to custom providers(MessageBodyWriter) making it not to be invoked

From: Shaswat <shaswat.dasgupta_at_gmail.com>
Date: Mon, 23 Feb 2015 02:32:37 -0700 (MST)

Hi Mark,

   Thanks for the reply.

   Well My custom MBR looks like below
    @Provider
@Produces("application/xml")
public class RestDataSourceMessageBodyWriter implements MessageBodyWriter {

 if I make my custom MBR more specific like

 @Provider
@Produces("application/xml")
public class RestDataSourceMessageBodyWriter implements
MessageBodyWriter<UserInfoDTO> {

(Here "UserInfoDTO" is the first DTO object which gets searlized to xml by
entity provider) *then it works* .But we cannot write custom MBR for
thousands of DTOs and it has to be any ways.What do you suggest here?

 



--
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-2-10-4-Entity-provider-selection-algorithm-gives-less-priority-to-custom-providers-MessageBodd-tp7583127p7583151.html
Sent from the Jersey mailing list archive at Nabble.com.