zoukankan      html  css  js  c++  java
  • webservice接口问题:Payload: No message body writer has been found for class domain, ContentType: application/xml

    当在使用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格式了

  • 相关阅读:
    寒假记录六
    寒假记录5
    寒假记录4
    寒假记录3
    寒假记录2
    寒假记录1
    hive数据库课堂测试
    第一周
    个人总结
    课程总结
  • 原文地址:https://www.cnblogs.com/wangxinblog/p/7339612.html
Copyright © 2011-2022 走看看