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
SImmySImmy 

I am able to authenticate the api through soap ui but why i am not able to authenticate the api when authenticating from apex?

I am getting following error : 19:40:18:141 USER_DEBUG [89]|DEBUG|Workday Submit Customer Error : System.CalloutException: IO Exception: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"

Please help or guide me the correct way. Thanks a lot in advance.
Best Answer chosen by SImmy
VinayVinay (Salesforce Developers) 
For error System.CalloutException: no protocol,  Check the endpoint URL.

Usually, you see this issue if the Endpoint URL is wrong or Blank.  Even after setting the Endpoint if you are still facing this issue URL might be wrong.

And use any testing tool (SOAP, Postman) to check whether the given URL for endpoint is correct.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Simmy,

The issue seems to be with firewall settings in your enterprise.

Review below link which can explain about whitelisting of IP's.

https://help.salesforce.com/articleView?id=000321501&type=1&mode=1

References.

https://salesforce.stackexchange.com/questions/270947/system-calloutexception-unable-to-tunnel-through-proxy-proxy-returns-http-1-1
https://salesforce.stackexchange.com/questions/286428/the-following-exception-has-occurred-io-exception-unable-to-tunnel-through-pro

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
SImmySImmy
Thanks for your reply but im working from home. How could it be firewall?
VinayVinay (Salesforce Developers) 
Do you use any VPN to connect?

Looking at the above error this could be related to the proxy.  

>> Make sure you have the firewall settings in your enterprise is configured to allow the inbound web service call.
>> Check whether the certificate is expired or not.
>> Check if your chain of trust has valid certificates.

Also, Using below link check if there was any service disruption on your instance.

https://status.salesforce.com/

Thanks,
Vinay Kumar
SImmySImmy
Now I'm getting io exception no protocol error. Even if I'm assigning the endpoint URL by creating the Instance of the class but still it says this error. I found this link but didn't understand what to do. Could you please help me? Link: https://developer.salesforce.com/forums/?id=906F000000090ZoIAI
VinayVinay (Salesforce Developers) 
For error System.CalloutException: no protocol,  Check the endpoint URL.

Usually, you see this issue if the Endpoint URL is wrong or Blank.  Even after setting the Endpoint if you are still facing this issue URL might be wrong.

And use any testing tool (SOAP, Postman) to check whether the given URL for endpoint is correct.

Thanks,
Vinay Kumar
This was selected as the best answer