• DA SILVA Bruno
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

I am getting error "The SOAP request must use SOAP 1.1, did not recieve a SOAP 1.1 Envelope as the document root" when trying to create a job for Bulk API http://www.salesforce.com/us/developer/docs/api_asynchpre/api_bulk.pdf

I have used OAuth protocol for authenticating with Force.com, and am using the method mentioned here to make my call.

I have correctly passed all the information required as mentioned in the Bulk API doc. Like passing access_token for sessionID, replacing ! in sessionID with \!
Also, I am using the same .txt file containing the XML required to create a job.

Following is my sample command:

curl https://xxx.salesforce.com/services/Soap/u/24/xxxxxxxxx/job -H "X-SFDC-Session: xxxxxxx\!xxxxxxxxxxxxxxx.o.SerXZ" -H "Content-Type: text/xml; charset=UTF-8" -H "SOAPAction: Update" -d @contact_job.txt

 


Kindly note that I have done the following changes:
Content-Type to text/xml from Content-Type: application/xml
Added header SOAPAction: Update
after I was getting error messages asking for the changes.

Following is the content of my contact_job.txt:

<?xml version="1.0" encoding="UTF-8"?>
<jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">
 <operation>upsert</operation>
 <object>Contact</object>
 <contentType>CSV</contentType>
</jobInfo>

 

I have tried both curl and direct Http POST, but same thing.
Has anyone faced a similar problem? Can anyone help he understand, resolve this error?

Regards,
Nilesh