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.

Based on here: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_certificate.htm

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">

Am I missing anything with the XML? Anyone who's automated this (even partially), protips greatly appreciated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.