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
Gaurav_NBINGaurav_NBIN 

The domain name does not exist - Web service callout

Hi

 

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">
<P>
While trying to retrieve the URL:
<A HREF="http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate">http://laatws62.farmersinsurance.com:29088/TQWeb/services/OfflineCustQuoteRate</A>
<P>
The following error was encountered:
<BLOCKQUOTE>
Unable to determine IP address from host name for
<I>laatws62.farmersinsurance.com</I>
</BLOCKQUOTE>

<P>
The dnsserver returned:
<BLOCKQUOTE>
Name Error: The domain name does not exist.
</BLOCKQUOTE>

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

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

Gaurav_NBINGaurav_NBIN

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
Hi,

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