Loading

'Unexpected element' error from web service callout

Udgivelsesdato: Oct 13, 2022
Løsning

The error, 'Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'.' occurs when there is an issue in communication with the external webservice. Here are a few things you can check to resolve the error.

1. Check if external web service is really available and working.
2. Check if Salesforce's IP addresses are included in allowlist on the firewall of the network where the external web service is located.
3. Validate the endpoint address of the web service.
4. Check if the endpoint's server is enabled as a Remote Site in Salesforce.
5. Remember that web service must be accessible from Internet to a public and valid IP address.
 

Additional Documentation:
Invoking Callouts Using Apex
Answers Forum Discussion

Vidensartikelnummer

000385914

 
Indlæser
Salesforce Help | Article