Client found response content type of 'text/html', but expected 'text/xml'

前端 未结 4 800
逝去的感伤
逝去的感伤 2020-12-20 13:39

I am getting this error:

Client found response content type of \'text/html\', but expected \'text/xml.

I am adding web reference

4条回答
  •  醉酒成梦
    2020-12-20 13:45

    Generally that error means that the service has sent back an (HTML) error message rather than the XML SOAP response that your client was expecting.

    For web services that you control it's really easy to find the problem, because you can invoke the webmethods by hand in your browser. To diagnose it when it's someone else's service is a little trickier. You might be able to trace into the code for your web reference and inspect the text of the response before the exception is thrown.

提交回复
热议问题