Reputation:
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'".
If I try and consume this same webservice in a WinForm app it works fine.
Sandeep
Upvotes: 1
Views: 648
Reputation: 21640
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.
The WinForms client probably accepts it like IE accepts XHTML tagged as text/html instead of application/xml; 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.
Upvotes: 1