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
AcademicHoboAcademicHobo 

System.CalloutException - Unauthorized endpoint error

I have a callout inside a trigger (using @future) that is returning the following:

 

Apex script unhandled exception by user/organization: 005A0000001WKkE/00DA0000000KYuL

 

Failed to invoke future method 'public static void invokeProcess(String, String, String, Decimal, String, String, String, Datetime, String, String)' on class 'xmlnsOracleComVuadvancesfJwsSftest' for job id '707A000000AYXxu'

 

caused by: System.CalloutException: IO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://hostname:port/soa-infra/services/default/project/client_ep

 

I have https://hostname:port in my Remote site settings (the port is well within the 1024 to 64K range).  The SF GUI won't accept the full endpoint URL (the result of the save is just the protocol, the hostname and the port, as I have described).  The message implies that the entire endpoint url should be used, but as I said, the GUI won't accept it.

 

So (1) is the whole endpoint URL needed in remote site settings?  And (2)

 

if so:  how can I compel SF to accept the endpoint URL (or why doesn't if save mine)?

If not:  Any ideas as to what else might be the problem?

 

Any and all help is most welcome and appreciated.

 

- Cris

Best Answer chosen by Admin (Salesforce Developers) 
AcademicHoboAcademicHobo

Sam:

 

It turned out to be something stupidly simple.  The endpoint in my WSDL contained the server part of the host name.  The domain wasn't there.  Once it added the domain to the endpoint, all was well.  Thanks for all your help.

All Answers

sdetweilsdetweil

Hm.  my wbe service uses

 

 

'http://server_url:9080/RTCWebService/services/RTCDefect';

and the remote system definition only has

http://server_url:9080

server_url is the actual www. address string..

there is ONE other point.. SFDC cannot deal with temporary Https certificates.
they MUST be official, certified and registered certificates.
I use a non-ssl protocol during development
Sam
AcademicHoboAcademicHobo

Sam:

 

Well...my cert is real (not self-signed).  I can reach the same server via outbound messaging without problem.  But I can try non-SSL.  At least I now know that losing the full path to the endpoint is not the problem.  Thx.

 

- Cris

sdetweilsdetweil

I could not reach my endpoint with outbound message either

 

also, be careful in the @future method..  I edited the generated invoke() code to use a common parameter value vs the hard coded literal in all the calls.

 

sam

 

AcademicHoboAcademicHobo

Sam:

 

It turned out to be something stupidly simple.  The endpoint in my WSDL contained the server part of the host name.  The domain wasn't there.  Once it added the domain to the endpoint, all was well.  Thanks for all your help.

This was selected as the best answer