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
Abhishek Pal 33Abhishek Pal 33 

Unable to call rest service in salesforce

Hello everyone,
I have as service which is running in my test env. When I try to call this service in salesforce I am getting this error “Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found".
Can someone plz help?

Thanks in Advance.
This is an issue with your local environment / proxy.  It is most likely misconfigured or does not have the correct permissions to allow Salesforce to connect.  You will need to address this at your proxy / firewall level.  This is not a Salesforce issue.
Abhishek Pal 33Abhishek Pal 33
I have resolved this issue. Thanks for your help. But I have one other issue how to test this service in salesforce the method present are for SOAP call like webserviceMock interface etc.
I would recommend reviewing over the documentation [1] and over the Trailhead module [2].  Both of these cover how to write tests for your callouts.

Abhishek Pal 33Abhishek Pal 33
The link that you have send is to test the callout if it is generated from WSDL. I am calling external rest service into salesforce. I want to test that method containing this service. What I have found is that all methods written are for SOAP services or apex class generated from WSDL. Even the webservice mock interface doesnt have parameters to test it as rest service. Can you please help?