2

I am working on integrating Salesforce with SAP ECC using SAP PI as a middleware. For this, I have imported SAP WSDL in Salesforce to make a call to SAP PI.

Steps performed in Salesforce:

  • Created an entry in Remote site setting with correct IP and port. e.g. https://121.XX.XX.111:8082
  • Imported the SAP webservice and generated apex classes from the SAP/ PI WSDL.
  • Created a Self-Signed certificate and added it on SAP/PI server.
  • Got Salesforce IP ranges whitelisted on the network.
  • While making a callout, set clientCertName_x = 'my_certificate_name'. set inputHttpHeaders_x = encoded_username_pwd_of_PI_server, used basic authentication.

Endpoint URL-1: https 121.XX.XX.111:8082/XISOAPAdapter/MessageServlet?senderParty=&senderService=SALESFORCE&receiverParty=&receiverService...

Error-1: System.CalloutException: IO Exception: java.security.cert.CertificateException: No subject alternative names matching IP address 121.XX.XX.111 found.


Few forum help suggested that, instead of making callout to IP address use hostname. Hence, using nslookup, we determined hostname of the corresponding IP and retried with below URL.

Endpoint URL-2: https static-111.XX.XX.121-tataidc.co.in:8082/XISOAPAdapter/MessageServlet?senderParty=&senderService=SALESFORCE&receiverService=&........

Error-2: System.CalloutException: IO Exception: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found"


Note that, when I test the connectivity to PI server from SOAP UI, request does reach the PI Server. However, request does not reach PI if it is made from Salesforce. Please suggest.

7
  • 1
    Sounds like your proxy is preventing the request from being made .Allow salesforce IPS in proxy .The error clearly says your proxy is blocking SFDC IPS Commented Mar 13, 2016 at 14:09
  • Thanks Mohith. I also suspected that IPs are not whitelisted but the network team has confirmed that they have whitelisted all the ranges. Moreover, when I request from SOAP UI it works i.e. I am able to see requests in PI server logs. Commented Mar 13, 2016 at 14:22
  • SOAP UI is from your local machine and hence will not confirm SFDC IP has been whitelisted. I would suggest to work with network team to make sure they whitelisted all SFDC IDs Commented Mar 13, 2016 at 14:29
  • Thanks Mohith. I will double check with the network team if they have whitelisted all sfdc IP ranges. Could you please give some pointers around following queries. 1. How can I resolve, "CertificationException" thrown in Error-1. I have generated Self-signed certificate in sfdc and imported in PI. Will Self-signed certificate work? Do I need CA-Signed Certificate? 2. Hostname approach mentioned in the Endpoint-2 is unlikely to work for me. Is there any restriction that endpoint should not be server IP? Commented Mar 13, 2016 at 14:30
  • please post these as separate questions so that all are benefitted from same Commented Mar 14, 2016 at 12:46

1 Answer 1

1

The proxy is preventing the request from being made from salesforce to PI.Allow salesforce IPS in proxy .The comprehensive list of IPS's to whitelist are in this article.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .