function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kevin DesaiKevin Desai 

Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html

Hi All,

I am getting the following error 
Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html

As per the online forums, this is when the external system returns HTML and not SOAP. But i think the error is from my side as im also getting faultcode:soap:client. 

Any help? Let me know if u need more info.
BalajiRanganathanBalajiRanganathan
1) have you added the domain name of the service to remote site settings
2) does SFDC has access to the remote service?

I think the issue is mostly the service is not public on internet. you have to check whether the service allows outside calls and might have to make it public on internet and whitelist salesforce ips so that SFDC can call the service.

https://help.salesforce.com/apex/HTViewSolution?id=000003652
EnreecoEnreeco
This usually is a 404 error (like resource not found).