I am trying to understand the right way to format a SOAP POST in order to upload a self-signed certificate into a scratch org.
My goal is to do this through PowerShell. As such, I've looked through some posts:
https://audministrator.wordpress.com/2016/03/23/salesforce-com-accessing-using-web-services-and-scripting-part-1/ https://audministrator.wordpress.com/2016/03/23/salesforce-com-accessing-using-web-services-and-scripting-part-2/ https://www.powershellbros.com/send-soap-message-powershell/
For anyone familiar with Salesforce's SOAP structure - is that WSDL file only create-able if you create an application on your org?
Also, this is what I think I'd need to send as the envelope provided I had all the right parameters and values when I invoke my script:
<?xml version="1.0" encoding="UTF-8"?> <Certificate xmlns="http://soap.sforce.com/2006/04/metadata"> <caSigned>$true</caSigned> <encryptedWithPlatformEncryption>$true</encryptedWithPlatformEncryption> <expirationDate>$ExpirationDate</expirationDate> <keySize>$KeySize</keySize> <masterLabel>$CertificateName</masterLabel> <privateKeyExportable>$false</privateKeyExportable> </Certificate>
Am I missing anything with the XML? Anyone who's automated this (even partially), protips greatly appreciated