+ Start a Discussion
Steven NsubugaSteven Nsubuga 

Can Salesforce access a web service on a company Intranet?

I have a client who has a system that is only accessible via the company's Intranet. I have a web service that I am calling from Salesforce. I got the following error:

CALLOUT_RESPONSE </head><body id=ERR_ACCESS_DENIED>
CALLOUT_RESPONSE <h2>The requested URL could not be retrieved</h2>
CALLOUT_RESPONSE <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>
CALLOUT_RESPONSE <p>Generated Mon, 15 Oct 2018 by proxy-dfw.net.salesforce.com (squid)</p>
EXCEPTION_THROWN [280]|System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'


I got that far by using a developer org. Sandbox and Production only gave me the Exception: System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'

Any advice/tips?
 
Best Answer chosen by Steven Nsubuga
Raj VakatiRaj Vakati

Install the certifcated on cloud and expose the webservice to cloud  

Get the your company CA or self signed certifcates and expose your service to cloud direcly .. so its more secure then nomal communication 

All Answers

Raj VakatiRaj Vakati
Hey  Steven  ,


Not direclty .. you need to mock that .. 

You can do it in two ways .. 
  1. Install the certifcated on cloud and expose the webservice to cloud
  2. Or Use intermidtaed service that will communicate between your network and cloud ..
I dnt think so any other way its possiable 
Steven NsubugaSteven Nsubuga
To be clear, I received a WSDL file, which I converted to Apex classes using Wsdl2Apex.
In line with this, please clarify what you mean in bullet 1.

With bullet 2, it may be possible, if the client accepts.
Raj VakatiRaj Vakati

Install the certifcated on cloud and expose the webservice to cloud  

Get the your company CA or self signed certifcates and expose your service to cloud direcly .. so its more secure then nomal communication 
This was selected as the best answer
Steven NsubugaSteven Nsubuga
Will try it out and give an update, thanks for the tips Raj!!