AnsweredAssumed Answered

Running complex SOQL in Salesforce

Question asked by mani.sethuraman333464 on Apr 13, 2017
Latest reply on May 1, 2017 by Srinivas Chandrakanth Vangari

Hi,

 

 My need to is to run a complex SOQL query in Salesforce and get the results and process it. I referred the following posts

How to Connect to Salesforce REST API with OAuth 2.0 

How to authenticate Salesforce using REST API? 

 

Used SoapUI and was able to make a REST GET call and got the results. The cURL also was successful. The command I used was 

 

c:\cURL\src\curl https://test.salesforce.com/services/data/v37.0/query?q=SELECT+Name+FROM+Account+Limit+4 -H "Authorization: Bearer 00D0S000000CMoneyQoAQB3xVBFfsr4M7_K0QTA0W_AisyqFOJLeTm8GfG65zW8U0c_MONEYe9K7B1tfGWtGLO1p0bKQDn2YnX0d890LSEVAR79G"

 

The URL that I used for both SoapUI and cURL are the same. I had to add Authorization to the Request Header in SoapUI versus pass as a parameter in cURL.

 

I have a process where I am able to pass the relevant details and get the SessionID. Assigning it to the Dynamic Process Property and passing as a Parameter to the HTTP Client Operation. I also validated that the right URL is called. Boomi reports that

 

 Sending message to server URL https://test.salesforce.com/services/data/v37.0/query/?q=select+id,name+from+account+limit+2

 

I am getting the error "Error message received from Http Server, Code 405: Method Not Allowed"

 

SoapUI is handling a long SOQL easily. Not sure what I am missing in Boomi. 

 

Any help/suggestion appreciated.

 

Thanks for reading!

Outcomes