Since my initial post, I have implemented MessageBodyWriter. Now the problem seems to be that DW/jersey can't find it.
Error: MessageBodyWriter not found for media type=application/xml Apparently, I must somehow get DW to turn on jersey auto discovery features. If anyone knows please respond. On Wednesday, October 5, 2016 at 10:14:51 AM UTC-4, [email protected] wrote: > > I don't know exactly how you did it, but the way I implement specific > serializers is two fold: > - either I want Jersey to directly delegate the serialization of a > specific type to my serializer, and I implement MessageBodyWriter<MyType> > that I register in jersey. > - either I want Jackson to delegate serialization of a specific type to > my serializer (for example if I want to reference my type in another type > already handled by Jackson) and then I implement StdSerializer that I > register in jackson object mappers. > > See some example there: > https://gitlab.com/victornoel/petals-cockpit/tree/master/backend/src/main/java/org/ow2/petals/cockpit/server/utils > > Le mercredi 5 octobre 2016 14:42:10 UTC+2, [email protected] > a écrit : >> >> I found if I include jersey-bundle in my dependencies, InjectableProvider >> gets on the classpath. Apparently, it is not included in DW. >> >> >> On Monday, October 3, 2016 at 8:55:27 AM UTC-4, >> [email protected] wrote: >>> >>> All, >>> >>> Using DW 0.9.0. >>> >>> I need to have jersey serialize my model into either JSON or XML depending >>> on the request. I think I get that part. >>> But my model is generated using EMF (Eclipse Modeling Framework) and so >>> annotating code would be, to say the least, ill advised. I need to >>> implement >>> custom serialization for XML. As I understand it, that means implementing >>> the interface InjectableProvider, which should be a part of jersey, however >>> I am not finding it >>> in DW. How can I get this done the DW way? >>> >>> Thanks in advance >>> >>> -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
