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

The domain name does not exist - Web service callout



I am newbee to salesforce. I need a small information, I am trying to hit a webservice which is available to the cloud. I am able to get the response using SOAP UI and browser if I provide the end point, but getting an error while trying the same through apex code.


<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
While trying to retrieve the URL:
<A HREF=""></A>
The following error was encountered:
Unable to determine IP address from host name for

The dnsserver returned:
Name Error: The domain name does not exist.

Is there any proxy/authorization settings in salesforce using which I can hit the service.
Please do reply, thanks in advance.

You cannot just directly hit the Webservice. You have two options, if its a SOAP Service, get the WSDL for the service and create an Apex Stub (using WSDL2APEX) and then use the methods to hit the service.


If its a REST Service, use Http methods and do a GET on the service


Thanks for the reply Karthik. This is my mistake actually.


Here are the steps I followed already...

1. Generated an Apex class using WSDL2APEX as its a SOAP service.

2. Added end point to the remote site.

3. Created a controller which is calling the service method.


Then I am getting this error. Though this service is giving the response in SOAP UI and normal browser hit also.

I am getting the host name if I ping the host name through command promt also.


I doubt about some permissions, please help.

Roopa SarathkumarRoopa Sarathkumar

I facing same problem now. Can you please let me know how you resolved this?