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
Hetal ShethHetal Sheth 

Can any one help me in bypass Salesfoce SSL Validation?

We are using third party web service in salesforce but our third party instance has self-signed certificate. I need to call soap web service of third party.
But when I am trying to call web service at that time I am receiving  below error
System.CalloutException: IO Exception: PKIX path building failed: unable to find valid certification path to requested target

Please Provide me way to by pass this error.
Hii Hetal,
This is not the salesforce problem.
You are doing something wrong in  putting the connection parameters of your third party web services. 
The error is telling that the certificate you are requesting through web service is not present on the given URL. 

Hetal ShethHetal Sheth

Hi Rishav,

Thanks for replay.
Please check my code and let me know what is the wrong in that.
public class soapWebserviceForHomeKeepers {
    public static long soapWebserviceForAgencyData(){        
     serviceArmHudGov.ArmServiceImplPort innerobj=new serviceArmHudGov.ArmServiceImplPort();
        innerobj.inputHttpHeaders_x = new Map<String, String>();
        // innerobj.clientCertName_x ='ARM_Test';
        // innerobj.clientCert_x ='MFl6ajAwMDAwMDBFcldjITEhVWk5REdiYlZXamFtM1RrSmlzL2xPMitRUTJtN3NsejAyS1gxSXdab1l2ST0=';
        // innerobj.clientCertPasswd_x = 'admin123';    
        String username = '*****';
        String password = '******';
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);

        innerobj.inputHttpHeaders_x.put('Cookie', 'name=value');
        serviceArmHudGov.submissionHeader5_0_element submissionHeader5_0_elementObj= new serviceArmHudGov.submissionHeader5_0_element();
       // innerobj.endpoint_x='';      
        long submissionId= innerobj.postAgencyData(submissionHeader5_0_elementObj,'TEXT/XML','');
        return submissionId;