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.
pconpcon
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.
pconpcon
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.

[1] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_testing.htm
[2] https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_soap_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?