Hi,

Im using SalesforceBulkApi connector(1.0.4) in WSO2 ESB(4.9.0) to bulk
query out object(Account) data from Salesforce to WSO2 ESB. I have gone
through below Salesforce bulk API from the postman and get the results
successfully.

https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_code_curl_walkthrough.htm

In postman I have created the job as following.

1. Create Job
Post Request -:  https://my.salesforce.com/services/async/42/job

Body-:
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload";>
<operation>query</operation>
  <object>Account</object>
<contentType>XML</contentType>
</jobInfo>

2. Create batch
Post Request -:
https://my.salesforce.com/services/async/42/job/7509E000003e9XfQAI/batch
Body-:
SELECT id,name FROM Account where LastModifiedDate >2018-04-09T11:40:47.000Z

The body just had the query only.

3. Get result set ID from the batch
Get Request -:
https://my.salesforce.com/services/async/42.0/job/jobId/batch/
7519E000002ZIV0/result


4. Get the result set as XML Get Request -:
https://my.salesforce.com/services/async/42/job/7509E000003e9XfQAI/batch/7519E000002ZIV0/result/7529E000001E2xM
I get the bulk query output successfully from postman client. Im trying to
do above steps from ESB. In ESB I have created the job as below and get the
job details successfully,
         <salesforcebulk.createJob>
            <operation>query</operation>
            <contentType>XML</contentType>
            <object>Account</object>
         </salesforcebulk.createJob>

But Im having issue how bulk query will bind to the batch.
<salesforcebulk.addBatch> <contentType>application/xml</contentType>
<jobId>{$ctx:jobID}</jobId> <objects>{$ctx:object}</objects>
</salesforcebulk.addBatch>

For above batch how will I bind the below query, SELECT id,name FROM
Account where LastModifiedDate >2018-04-09T11:40:47.000Z"
query to batch? Could someone please help me Thank You & Regards,
Prasan De Alwis
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to