MIME type issue

9 views
Skip to first unread message

Lavin Motwani

unread,
Oct 17, 2017, 2:42:50 AM10/17/17
to Swagger

Error: org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteToSEVERE: MessageBodyWriter not found for media type=application/vnd.xyzcompany.v1+json, type=class model.OrderStatus, genericType=class model.OrderStatu


OrderStatus is a model class.


Facing this issue when trying to return the Object of class OrderStatus.


The main reason for this is Media Type, when i tried it using application/json it worked, but need to do it with custom media type like: application/vnd.xyzcompany.v1+json


Extra Info: @Produces and @Consumes are used with the same media type and OrderStatus class is defined in the response of the request.

Wherever I read mostly found that, custom mime/media type need to be registered but don't know how to register and implement.



Can anyone help to resolve this issue.





Thanks in advance :)

Reply all
Reply to author
Forward
0 new messages