我正在尝试使用 CURL 命令创建批量 API 作业。我的文件 job.txt 如下 -
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<operation>Query</operation>
<object>account</object>
<contentType>CSV</contentType>
</jobInfo>
curl命令如下-
curl https://XXXXX.salesforce.com/services/Soap/u/42.0 -H "X-SFDC-Session:XXXXXXXXX" -H "Content-Type: text/xml; charset=UTF-8" -H "SoapAction":Query -d @job.txt
但是当我执行上面的命令时,我收到如下错误-
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://shemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapev:VersionMismatch</faultcode><faultstring>The SOAP request must use SOAP 1.1, did not recieve a SOAP 1.1 Envelope as the document root</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
我是 SFDC 批量 API 的新手