• WSE 3.0 启用了MTOM的问题


    winform 客户端通过WEB服务(采用WSE3.0,启用了MTOM)获取数据,偶尔会收到:"请求因 HTTP 状态 400 失败: Bad Request。"的错误返回,
    同时发现服务器的事件日志里以下的错误:
    HTTP/ASMX Message Receive Failure: System.Xml.XmlException: 根级别上的数据无效。 行 2,位置 1。
       在 System.Xml.XmlTextReaderImpl.Throw(Exception e)
       在 System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       在 System.Xml.XmlTextReaderImpl.Throw(String res)
       在 System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
       在 System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       在 System.Xml.XmlTextReaderImpl.Read()
       在 System.Xml.XmlTextReader.Read()
       在 Microsoft.Web.Services3.Xml.XmlSkipDTDReader.Read()
       在 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       在 System.Xml.XmlDocument.Load(XmlReader reader)
       在 Microsoft.Web.Services3.SoapEnvelope.Load(Stream inStream)
       在 Microsoft.Web.Services3.WseProtocol.CreateRequestSoapEnvelope(SoapServerMessage message)
       在 Microsoft.Web.Services3.WseProtocol.GetRequestEnvelopeFromMessage(SoapServerMessage message)
    查找了很久都不知道是什么问题导致的,估计是启用了MTOM才会这样,不知道谁遇到过这种情况,帮忙看看.

    我的WSE3.0配置:
    <microsoft.web.services3 >
    <messaging >
    <mtom clientMode="On" serverMode="optional"/ >
    </messaging >
    <security >
    <securityTokenManager >
    <add type="TorchUsernameTokenManager" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/ >
    </securityTokenManager >
    </security >
    <policy fileName="wse3policyCache.config"/ >
    </microsoft.web.services3 >
  • 相关阅读:
    字符串-06. IP地址转换
    字符串-05. 字符串循环左移
    字符串-04. 字符串逆序
    BZOJ 3110
    UOJ 34 fft板子
    BZOJ 2716
    BZOJ 2243
    BZOJ 3697
    BZOJ 1176
    BZOJ 2599
  • 原文地址:https://www.cnblogs.com/hxw/p/940851.html
Copyright © 2020-2023  润新知