ertank 27 Posted March 30, 2022 Hello, There is an application that consumes a SOAP web service. From time to time this web service is not stable and sending various html error messages instead of a valid response. Using Delphi 10.4.2 I would like to read incoming html data and display this to the user. Currently, all we can display is "Received content of invalid Content-Type setting: text/html - SOAP expect "text/xml" error message. I have searched the internet. Someone suggested to modify Soap.SOAPHTTPTrans.THTTPReqResp.CheckContentType and prevent it from raising an exception but this does not sound like a decent solution and might cause other troubles with other applications using SOAP. What I am after is a solution to be used just with this specific application of ours. I wonder if there is an alternative solution that can be used. Thanks & Regards, Ertan Share this post Link to post
Ruslan 5 Posted March 31, 2022 I would capture that content (on exception of course) and will try to parse it for content that describes the error and display it to the user. But first I would try to collect all types of errors/html and create some kind of templates to make it easier for parser (from above) to get the right content. Share this post Link to post