dubbox icon indicating copy to clipboard operation
dubbox copied to clipboard

Unable to find a MessageBodyReader of content-type text/html

Open skysoul1985 opened this issue 8 years ago • 2 comments

RESTEASY003145: Unable to find a MessageBodyReader of content-type text/html;charset=UTF-8

哪位同学碰到过这个问题,在项目中调用微信的接口,使用resteasy client 的 proxy功能,在函数接口根据微信规范定义@Consumes({ContentType.TEXT_XML_UTF_8})和@Produces({ContentType.TEXT_XML_UTF_8}),因为都采用xml协议,但是微信在异常返回时的content-type却为text/html,导致出现如上问题;

skysoul1985 avatar Oct 09 '16 02:10 skysoul1985

已经解决,说下自己的解决方式:自定义实现MessageBodyReader 子类,完成xml解决和bean注入工作

skysoul1985 avatar Oct 12 '16 07:10 skysoul1985

@skysoul1985 请教一下在哪实现MessageBodyReader 子类,怎么和dubbox整合?

dukeland9 avatar Sep 28 '17 14:09 dukeland9