Notes on Reference Citations - Version 2.71, by Dr. Herong Yang
Apex Soap call authentication problem
'What Is WS-Security Username Token Profile?' tutorial was cited in a salesforce.com forum post in 2015.
The What Is WS-Security Username Token Profile? tutorial was cited in a salesforce.com forum post in 2015.
Subject: Apex Soap call authentication problem Date: Nov 6, 2015 Author: Rene Hernandez Source: https://developer.salesforce.com/forums/?id=906F00000005JL3IAM >Rene Hernandez > >Has anyone encountered an issue with wsse authentication for soap >calls in apex? We have made sure that the password digest and >credentials are correct. > >authentication works in SoapUi, but fails from our apex class. > >Ideas would be great as we are pulling our hair trying. ... See the above request..the problem is in Security header for password digest. We calculate the password digest... through below methods in apex code: String x=nonce+datetimestamp+'pwd'; Blob hash = Crypto.generateDigest('SHA1', Blob.valueOf(x)); String digest= EncodingUtil.base64Encode(hash); This password digest is not matching with password digest calculated in SOAP. it this gets matched..issue will get solved. You can have an idea of this security protocal oat below link: http://www.herongyang.com/Web-Services /WS-Security-Username-Token-Profile.html
Table of Contents