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
salestestsalestest 

While Calling Webservice from Apex code getting Exception

{faultcode:'soapenv:Client', faultstring:'System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

 

Class.ApexcallingBpelSimple.ApexCalling_BPEL_SimplePort.process: line 19, column 13
Class.SFDCSyncWrapper.CreateFunction: line 12, column 17
External entry point', }

 

how to fix this

 

Thanks,

Vivek.

Best Answer chosen by Admin (Salesforce Developers) 
WilmerWilmer

Hi salestest,

 

Usually, when you get this error message it is produced by a problem of communication with the external webservice. And as I can see, your code is waiting to work with the response of that

 

Try to:

1. Check if external ws 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 ws is located.

3. Validate the endpoint address of the ws.

4. Check if the endpoint's server is enabled as a Remote Site in Salesforce.

5. Remenber that ws must be accesible from Internet to a public and valid IP address.

 

I hope this information helps you.

 

Regards,

 

 

Wilmer

 

All Answers

WilmerWilmer

Hi salestest,

 

Usually, when you get this error message it is produced by a problem of communication with the external webservice. And as I can see, your code is waiting to work with the response of that

 

Try to:

1. Check if external ws 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 ws is located.

3. Validate the endpoint address of the ws.

4. Check if the endpoint's server is enabled as a Remote Site in Salesforce.

5. Remenber that ws must be accesible from Internet to a public and valid IP address.

 

I hope this information helps you.

 

Regards,

 

 

Wilmer

 

This was selected as the best answer
salestestsalestest
Thanks Wilmer.
SrinuSrinu

Hi Wilmer,

Firewall issue:
SFDC is a public network, whereas ‘my company’ is a private network. I believe there is some security issues for ‘my company’ to open a firewall for SFDC to receive data from it.

 

As of now we are recieving exception error.

So I believe, ws must be accessible from public newtwork (Internet) with restricted IP addresses...Then we can avoid this error.

How could, we take steps in this situation?

any suggestion would be appreciated.