码迷,mamicode.com
首页 > 移动开发 > 详细

webservice有关application/xop+xml的异常

时间:2017-07-07 10:13:09      阅读:317      评论:0      收藏:0      [点我收藏+]

标签:system   方式   utf-8   bind   logs   basic   err   同事   get   

今天同事调用一个webservice时返回类似错误

响应消息的内容类型 multipart/related; type="application/xop+xml"; boundary="uuid:026bd32a-6fb3-45a6-8559-fe68024bfe2a"; start="<root.message@cxf.apache.org>"; start-info="text/xml" 与绑定(text/xml; charset=utf-8)的内容类型不匹配。如果使用自定义编码器,请确保正确实现 

搜索找到这个地方

http://stackoverflow.com/questions/10496186/error-consuming-webservice-content-type-application-xopxml-does-not-match-ex

原来只需修改配置的编码方式为“Mtom”就能解决问题

<configuration>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding messageEncoding="Mtom">          
        </binding>
      </basicHttpBinding>
    </bindings>
  </system.serviceModel>
</configuration>

webservice有关application/xop+xml的异常

标签:system   方式   utf-8   bind   logs   basic   err   同事   get   

原文地址:http://www.cnblogs.com/wpcnblog/p/7130330.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!