System.Web.Services.Protocols.SoapException: 服务器无法处理请求。

发布时间 2023-03-27 11:08:40作者: AnniJax

在postman调用webservice时提示这个,但是用网页可以调用。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <soap:Fault>
            <soap:Code>
                <soap:Value>soap:Receiver</soap:Value>
            </soap:Code>
            <soap:Reason>
                <soap:Text xml:lang="zh-CHS">System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---&gt; System.Xml.XmlException: 根级别上的数据无效。 第 1 行,位置 1。
   在 System.Xml.XmlTextReaderImpl.Throw(Exception e)
   在 System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   在 System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   在 System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read()
   在 System.Xml.XmlReader.MoveToContent()
   在 System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement()
   在 System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest()
   在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   在 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)
   --- 内部异常堆栈跟踪的结尾 ---</soap:Text>
            </soap:Reason>
            <soap:Detail />
        </soap:Fault>
    </soap:Body>
</soap:Envelope>