简体   繁体   English

Delphi Soap Server和CF.NET应用程序

[英]Delphi Soap Server and CF.NET application

I have a soap server written in Delphi and I am writing a PDA clinet using CF.NET 3.5 but I am getting following error "client found response content type of 'text/html', but expected 'text/xml'". 我有一个用Delphi编写的肥皂服务器,并且正在使用CF.NET 3.5编写PDA clinet,但出现以下错误“客户端发现响应内容类型为'text / html',但预期为'text / xml'”。

If I try and consume this same webservice in a WinForm app it works fine. 如果我尝试在WinForm应用程序中使用同一Web服务,则可以正常工作。

Sandeep 桑迪普

Could be that your CF client is more picky and actually wants its XML served as text/xml , but the soap server does not provide the HTTP Content-Type header or does not set it to text/xml. 可能是您的CF客户端更挑剔,实际上希望将其XML用作text / xml,但是soap服务器不提供HTTP Content-Type标头或未将其设置为text / xml。
The WinForms client probably accepts it like IE accepts XHTML tagged as text/html instead of application/xml; WinForms客户端可能接受它,就像IE接受标记为text / html而不是application / xml的XHTML一样。 it's so common out there... 那里很普通...

Or the client is getting something else that you don't expect: have you tried to set a proxy to see what is actually sent? 还是客户端得到了您不期望的其他东西:您是否尝试设置代理以查看实际发送的内容?
For example, if the server for whatever reason wants a login and sends a login page, that would be plain html and your client would not like it if it's waiting for an xml packet. 例如,如果服务器出于某种原因想要登录并发送登录页面,则该页面将为纯HTML,并且客户端在等待xml数据包时不喜欢它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM