• Navinkumar Sethiya
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello Team,

I have visual studio code installed, Salesforce CLI and Java JDK is installed. All path and Java_Home is also configured but while launching terminal and getting an error-The terminal process failed to launch: A native exception occurred during launch (Cannot create process, error code: 267).

Also while authorizing an org getting the error-17:06:38.524 sfdx force:auth:web:login --setalias DummyOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with error spawn C:\Windows\system32\cmd.exe ENOENT

Request you to please help me to solve this problem
Hi All,
During Migration from Classic Visualforce to Lightning experience, should we go with VIsualforce with SLDS or Lightning Aura Component?
What are rules we should consider whether to fo with Visualforce with SLDS and Lightning Aura Component
Hi All,
During Migration from Classic Visualforce to Lightning experience, should we go with VIsualforce with SLDS or Lightning Aura Component?
What are rules we should consider whether to fo with Visualforce with SLDS and Lightning Aura Component
Hello,

I'm trying to make a call to a WebService that requires the Soap Security Header to be provided in the message. They also require Password Digest.

I am able to POST a message to the service, and getting the response I'm looking for, using a tool such as SOAP UI. In the log I see the Soap Header looks like this

<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-0A895E4ED2XY1B64BB142239383782811>
    <wsse:Username>irhythmtest</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">kxPMdaV96UNV1OXw0B83IpnwgNc=</wsse:Password>
    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">LTYzMDgmJTU1MTE5ODgyMjQ2HOZ==</wsse:Nonce>
    <wsu:Created>2015-01-27T09:41:14Z</wsu:Created>
</wsse:UsernameToken></wsse:Security></soapenv:Header>

What I'm trying to do is to create this header in an Apex Class.
I highligheted in BOLD (above) the "variable" fields.

- For Password Digest, I'm generating the string using the process below

            Blob targetBlob = Blob.valueOf('mypass');
            Blob hash = Crypto.generateDigest('SHA1', targetBlob);
            String b64 = EncodingUtil.base64Encode(hash);  

- For Nonce, I'm generating the string using the process below

            Long randomLong = Crypto.getRandomLong();
            String Nounce = EncodingUtil.base64Encode(Blob.valueOf(String.valueOf(randomLong)));

- For Created, I'm generating the string using the process below

            String Create = Datetime.now().formatGmt('yyyy-MM-dd\'T\'hh:mm:ss\'Z\'');

I am not sure what goes in the wsu:Id="UsernameToken part of the header. How are tools such as SOAP UI generating a different and accepted Token in each call?

Any help or ideas on this would be highly appreciated

Thanks!
Giorgio