【问题标题】:Cannot process the message because the content type 'text/xml;charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'无法处理消息,因为内容类型 'text/xml;charset=UTF-8' 不是预期的类型 'application/soap+xml;字符集=utf-8'
【发布时间】:2020-04-25 07:59:52
【问题描述】:

从 SoapUI 客户端向 WCF 服务发送请求时出现以下错误:

无法处理消息,因为内容类型 'text/xml;charset=UTF-8' 不是预期的类型 'application/soap+xml;字符集=utf-8'

【问题讨论】:

    标签: wcf soapui wshttpbinding basichttpbinding service-model


    【解决方案1】:

    SoapUI 默认使用soap 协议1.2 版,服务绑定使用basichttpbinding,女巫公开为soap 协议1.1

    要在soap 1.1 中发送请求,请执行以下操作:

    1. 在项目树中,绑定级别见左下角的属性窗格。 将 Soap 版本属性更改为 Soap 1.1

    2. 创建新请求。 之前创建的请求表单仍将在 1.1 版中发送数据

    来源:https://community.smartbear.com/t5/SoapUI-Pro/how-to-change-SOAP-version-when-updating-binding/td-p/20229

    【讨论】:

    • 它确实有效,但在我这边,默认自动生成的请求使用soap11。你介意分享你的 SOAPUI 版本吗? i.stack.imgur.com/ZJJFg.png
    • 我使用的是 5.5.0 版。
    猜你喜欢
    • 2019-05-28
    • 2013-01-02
    • 2014-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 2015-03-02
    相关资源
    最近更新 更多