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
Dev_SfdcDev_Sfdc 

Web service callout failed: Could not find client cert with dev name

Dear All,

 

I created one global webservice class and a webserive method for which one string is the parameter.

I generated the class wsdl and as well as the partner wsdl.

 

Now in the second salesforce instance

 

I consumed the two wsdl's and through vf & controller i am able to call the required method through stub and getting the o/p as well. Before this i passed one of the user session id.

 

Now i want to try this with the certificate so for that i generated one self signed ceriticate in the SFDC Instance 1 and tried to put the below line in the second instance controller part but getting the mentioned subject error as "System.CalloutException: Web service callout failed: Could not find client cert with dev name: 'XXXX' specified in clientCertName_x".

 

The unique name and the name mentioned is same and even i am getting the error.

 

Please helpout.

 

Below is the controller code part

 

*********************************

 

public class WSContoller
{  
public String getHelloWorld()
{
 partnerSoapSforceCom.Soap sp = new partnerSoapSforceCom.Soap(); 


 String username='XX';
 String password='XX';
 //private SoapBindingStub binding;


 partnerSoapSforceCom.LoginResult loginResult = sp.login(username, password); 
 soapSforceComSchemasClassValidate.SessionHeader_element sessionHeader = new soapSforceComSchemasClassValidate.SessionHeader_element(); 
 sessionHeader.sessionId = loginResult.sessionId;  
 
               
 soapSforceComSchemasClassValidate.Validate  stub = new soapSforceComSchemasClassValidates.Validate();
 stub.clientCertName_x ='XXXX';
 stub.SessionHeader=sessionHeader;
 String MyReturn = stub.check('00000');
 
 
 system.debug('Returned ************** ' + MyReturn);         
 return MyReturn ;  
 }  
 }