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
sfdc2705sfdc2705 

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

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

I have generated the Apex classes from the WSDL.

when i am trying to execute anonymous log the above exception comes.

FYI here the endpoint in the remote settings is pointed to 'Intranet'.

Please let me know how to sove and any work arounds..

Thanks
Pramod_SFDCPramod_SFDC
Usually this error occurs if there is some issue in communication with the external webservice.
Check the following:

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



Thanks
Pramod