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
Alok_NagarroAlok_Nagarro 

Callout error: The requested URL could not be retrieved

Hi,

 

I am trying to make callout to external service from salesforce , getting exception :

 

System.CalloutException: Web service callout failed: Unexpected element.
Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

 

When i debug the callout, got following response -

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://dev-usmi.genworth.com/ws/GNWFileUtilsES.Services.FileUtilsSvc/GNWFileUtilsES_Services_FileUtilsSvc_Port">http://dev-usmi.genworth.com/ws/GNWFileUtilsES.Services.FileUtilsSvc/GNWFileUtilsES_Services_FileUtilsSvc_Port</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Connection to 206.83.178.91 Failed
</STRONG>
</UL>

<P>
The system returned:
<PRE><I>    (113) No route to host</I></PRE>

<P>
The remote host or network may be down.  Please try the request again.
<P>Your cache administrator is <A HREF="mailto:support@salesforce.com">support@salesforce.com</A>. 

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Tue, 17 Apr 2012 08:53:17 GMT by proxy-tyo.net.salesforce.com (squid)
</ADDRESS>
</BODY></HTML>

 After analyzed the response am sure that am getting exception because of response am getting as HTML instead of SOAP. Can anyone tell me wat issue may the cause of this response ? and how to resolve it..?

 

Any help would appreciated..

Best Answer chosen by Admin (Salesforce Developers) 
Noam.dganiNoam.dgani

possibilities:

 

1.endpoint is not valid - i tried pasting it in my browser and it wasnt found.

 

2. a firewall is blocking you. if that is that case, you might want to whitelist salesforce IPs

 

All Answers

Noam.dganiNoam.dgani

possibilities:

 

1.endpoint is not valid - i tried pasting it in my browser and it wasnt found.

 

2. a firewall is blocking you. if that is that case, you might want to whitelist salesforce IPs

 

This was selected as the best answer
diecarriondiecarrion

I have the same error here, except for the description I have a "Read error" instead of Connetion.

I try a HTTP CallOut, and this is what I got:

 

<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://5c9fd1928cb34debb2609d8ec9557d00.cloudapp.net/Services/AccountService.svc/pushAccountInformation">http://5c9fd1928cb34debb2609d8ec9557d00.cloudapp.net/Services/AccountService.svc/pushAccountInformation</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Read Error
</STRONG>
</UL>

<P>
The system returned:
<PRE><I>    (104) Connection reset by peer</I></PRE>

<P>
An error condition occurred while reading data from the network.  Please
retry your request.
<P>Your cache administrator is <A HREF="mailto:support@salesforce.com">support@salesforce.com</A>. 

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Wed, 11 Jul 2012 14:50:40 GMT by proxy-chi.net.salesforce.com (squid)
</ADDRESS>
</BODY></HTML>

 

This issue is really drive me crazy. The endpoint is Ok,( you can check it out) 

I added IP to whitelist  in the network access section and I added the URL to the trusted sites

 

Please I need some help