I am trying to invoke 3rd party web-services from Salesforce using WSDL2APEX. The client has also shared a .p12 certificate which I need to use for client authentication while making web-service call from Salesforce along with username and password.

I converted above .p12 into base64 using openSSL and tried below:

stub.clientCert_x = 'base64encodedstring';
stub.clientCertPasswd_x = 'password used for importing .pfx (password used for protecting private key)'

I am not sure above password is same as keystore password. But this method is not working.

I converted .p12 into .jks and imported the same in Salesforce and used below:

stub.clientCertName_x = 'CertificateUniqueName';

Even above method didn't work. Tried the same with HTTP callouts, but no luck.

I am not sure where I am going wrong. I am getting response from the server that authentication certificate is missing, hence I believe that the callout is successful.

My client has used "GlobalSign Root CA" which is supported by Salesforce.

Please let me know if my approach is wrong. Should I first export .p12 into public and private keys and then use it ?

  • please provide your solution, we r also facing same issue
    – sdandamud1
    Oct 14, 2020 at 15:08


You must log in to answer this question.

Browse other questions tagged .