I am trying to create Bulk API job using CURL command.my file job.txt is as below-
<?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 command is as below-
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
but when i execute above command i am getting the error as below-
<?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>
i am new to SFDC bulk api
You are calling the SOAP endpoint where you should be calling the REST endpoint (or use a SOAP request on the SOAP endpoint).
I think you are using this example: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_code_curl_walkthrough.htm. If that's the case you are using the wrong request URL. Try /services/async/42.0/job
instead of /services/Soap/u/42.0
.