从网络接收的XML存在问题。有关详细信息,请参阅内部异常 [英] There is a problem with the XML that was received from the network. See inner exception for more details

查看:424
本文介绍了从网络接收的XML存在问题。有关详细信息,请参阅内部异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的公司服务器上有一个WCF服务。

我适用于所有客户。但我们的一个客户端无法连接到该服务。当客户端尝试连接消息时

Hi I have a WCF service on my company server.
I works well for all clients.But one of our client cannot connect to the service. When the client tries to connect the message

There is a problem with the XML that was received from the network. See inner exception for more details



返回。

我使用Fiddler调查交换的HTTP消息。当我从我自己的系统连接到服务时,Fiddler捕获的HTTP响应是


returns.
I used Fiddler to investigate the HTTP messages that exchange. When I connect from my own system to the service the HTTP response captured by Fiddler is

HTTP/1.1 200 OK
Date: Sun, 03 Feb 2013 10:23:57 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 376
Cache-Control: private
Content-Type: text/xml; charset=utf-8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><InvokeMainServiceResponse xmlns="http://tempuri.org/"><InvokeMainServiceResult>00A000620B6A60643C40669460B4002055C0686071270476002A3223030BD67400606662326627040007E00024D0206D320C96264061BA6702766402206F24443002600860076D041807</InvokeMainServiceResult></InvokeMainServiceResponse></s:Body></s:Envelope>





这是正确的,但当我从客户端连接时,响应是



which is correct but when I connect from the client the response is

HTTP/1.0 200 OK
Date: Sun, 03 Feb 2013 09:54:58 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 376
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Connection: keep-alive

private
Content-Type: text/xml; charset=utf-8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><InvokeMainServiceResponse xmlns="http://tempuri.org/"><InvokeMainServiceResult>00A000620B6A60643C40669460B4002055C0686071270476002A3223030BD67400606662326627040007E00024D0206D320C96264061BA6702766402206F24443002600860076D041807</InvokeMainServiceResult>





和以下两行额外的行



and the following two extra lines

private
Content-Type: text/xml; charset=utf-8





导致客户端程序无法从HTTP响应中提取XML。

我无法弄清楚这些线来自哪里。真的需要你的帮助。

谢谢。



cause the client program not to be able to extract the XML from the HTTP response.
I cannot figure out where those lines come from. Your help is really needed.
Thanks.

推荐答案

实际上还有三个额外的行 - 一个空白。这条线可能是导致失败的原因。


然而,http响应是不正确的。上游的某些内容可能错误地使用缓冲区,因此您将获得插入的http标头的一部分。因此,第一步是弄清楚失败的客户端和实际服务器之间的服务器。



你还应该尝试寻找除了你的其他测试客户端框。如果发生故障的客户端位于您的网络之外,那么请查找网络外的另一个不同的客户端框,并使用该框进行测试。
Actually there are three extra lines - one blank. That line is probably what causes the failure.

However the http response is ill-formed. Something up stream is probably incorrectly using a buffer and consequently you get part of a http header inserted. So first step would be to figure out the servers that are between the client that fails and the actual server.

You should also try looking for other test clients besides just your box. If the failing client is outside your network then look for another different client box that is outside your network and test with that.


这篇关于从网络接收的XML存在问题。有关详细信息,请参阅内部异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆