To see the actual response for which this error is getting generated we have added a few extra logging in com.sforce.ws.transport.SoapConnection > send() method and it turned out that the response is coming from the Salesforce edge.
For a client, it is very difficult to get an idea about the cause or the source of the HTML response without interfering with the force-API. Hence it would be better if we introduce some API by which the client of force-wsc API can get a hold of the actual raw response which is sent from the salesforce back-end.
We are getting the following error intermittently while using force-wsc API with our application.
Encountered HTML Content when looking for http://schemas.xmlsoap.org/soap/envelope/:Envelope
To see the actual response for which this error is getting generated we have added a few extra logging in com.sforce.ws.transport.SoapConnection > send() method and it turned out that the response is coming from the Salesforce edge. For a client, it is very difficult to get an idea about the cause or the source of the HTML response without interfering with the force-API. Hence it would be better if we introduce some API by which the client of force-wsc API can get a hold of the actual raw response which is sent from the salesforce back-end.