无效的XML SOAP Web服务

时间:2018-09-17 23:08:56

标签: .net xml web-services soap

我需要一些帮助来理解为什么我的Web服务会返回无效的XML作为响应。

我的服务发送以下SOAP响应:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ContaCorrenteClientesResponse xmlns="http://tempuri.org/WebServices/wsPortal">
          <ContaCorrenteClientesResult>true</ContaCorrenteClientesResult>
        </ContaCorrenteClientesResponse>
    </soap:Body>
</soap:Envelope>

但是,Web服务有时会发送无效的XML。我有一个应用程序客户端,每个调用该服务的循环都有一个。随机地,响应是无效的xml。我已经在客户端运行了Fiddler,并且得到了以下响应:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.ult>true</ContaCorrenteClientesResult>
        </ContaCorrenteClientesResponse>
    </soap:Body>
        <ContaCorrenteClientesResponse xmlns="http://tempuri.org/WebServices/wsPortal">
</soap:Envelope>

在应用程序客户端中,由于字符无效,引发了异常。错误是随机发生的;有时在第10次迭代中,有时在第16次迭代中,...

不正确地处理了来自服务器的响应。关于导致无效响应的原因有何建议?

PS:服务器上的SO是Windows Server 2003。

谢谢

0 个答案:

没有答案