You need to sign in to do that
Don't have an account?
Error: Compile Error: Method does not exist or incorrect signature
I have an external web service that I am trying to invoke in an apex class, but when I try to compile the class I get the following error message:
Error: Compile Error: Method does not exist or incorrect signature: [Cryptographyapi].Decrypt(Cryptographyapi.CredentialInfo, Cryptographyapi.DecryptRq) at line 64 column 52 |
Cryptographyapi.CredentialInfo Credentials2 = new Cryptographyapi.CredentialInfo();
Credentials2.UserName = config.API_Userid__c;
Credentials2.Password = config.APIPassword__c;
Credentials2.SecurityToken = config.APISecurityToken__c;
Cryptographyapi crypto = new Cryptographyapi(); //Web service class generated from wsdl
Cryptographyapi.DecryptRq crrequest = new Cryptographyapi.DecryptRq();
crrequest.TextToDecrypt = creditcard.Credit_Card_Number__c;
crrequest.PassPhrase = passPhrase;
crrequest.Salt = saltValue;
crrequest.HashAlgorithm = hashAlgorithm;
crrequest.PasswordIterations = passwordIterations;
crrequest.InitVector = initVector;
crrequest.KeySize = keySize;
//This is the signature for the method below that throws the error
//public Cryptographyapi.DecryptRs Decrypt(Cryptographyapi.CredentialInfo, Cryptographyapi.DecryptRq) -
//This is the method that causes the error
Cryptographyapi.DecryptRs crresponse = crypto.Decrypt(Credentials2,crrequest);
Everything looks correct. I cannot see a problem with the way I am calling the web service. In addition I have a different web service I am calling on the same page and that works fine. Any help would be greatly appreciated.
Hi sulox,
looks correct to me....unless there is a typo.
Can you try commenting the method in error, and see if the code executes the other webservice on the page?
- A J
hmm..
could you post the Apex class(generated using the WSDL) snapshot for this method?
- A J