当在使用cxf-rs的webservice的时候,有时候在传输数据,会发生这种错误

错误代码:

Response-Code: 500
Content-Type: text/plain
Headers: {Content-Type=[application/xml], Date=[Thu, 10 Aug 2017 06:41:49 GMT]}
Payload: No message body writer has been found for class cn.itcast.bos.domain.base.Area, ContentType: application/xml

这是由于实体类上,没有配置@XmlRootElement注解,这样一来,webservice就没办法去把元素给解析成xml格式或者json格式了

相关文章:

  • 2021-07-17
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2021-10-26
  • 2021-07-29
  • 2021-09-23
相关资源
相似解决方案