Salesforce REST integration JAVA Application
Jun15

Salesforce REST integration JAVA Application

Force.com REST API PROBLEM: How to connect/query/SOQL to any Salesforce.com account using REST API and JSON Payloads. This application will provide a great help in testing all kinds of Salesforce object queries in SOQLs and creating or updating various Salesforce custom as well as standard objects by the help of JSON Stings. SOLUTION: We build a small java based application which will achieve the following objectives. User enters the Client Id, Client Secret and the file name. Connect to the Salesforce Account using the above information. After a Successful connection the User can do any of the below Operations. Enter a SOQL Query to view the Results/Working. Enter a JSON String to Create/Update/Delete a Salesforce Object (Standard/Custom). The Solution is divided into various Blogs having all the Screenshots, Data flow diagrams, Flowcharts and Java/Html source codes. You can easily understand all the steps and can create the application on your end by the help of the various resources. The solution gives an in depth understanding of all the steps of REST authorization from Salesforce and generation of the access Token for further REST calls. The core part of our solution is the initial authorization of the Rest Application. User can also test almost any Salesforce object query and can also transfer the Record information to be created on salesforce in the JSON String format.   REQUIREMENTS: Apache Server, Eclipse IDE and Salesforce Developer Edition account. The User should also have some information about Salesforce force REST cUrls or it can be learnt almost instantly while testing the Rest Application being created in this blog. WE PROVIDE: We provide all the Screenshots, Data flow diagrams, Flowcharts and Java/Html source codes, URLs and Steps to perform. http://developer.force.com/REST   STEP 1. Enable Remote Access in SFDC. Log in to Salesforce.com with your developer account, navigate to Top Right corner, Your Name ➤ Setup ➤ Develop ➤ Remote Access, and click New to create a new remote access application if you have not already done so.   If you are running the application server on your own machine (the most common case for a development environment), then the URL will look like https://localhost:8443/Rest/oauth/_callback. After clicking Save, you will see your new application’s credentials: Click the link to reveal the consumer secret. Note – OAuth 1.0 terminology is currently used in the Remote Access screen. The OAuth 2.0 specification uses ‘client’ in place of ‘consumer’.Copy the consumer key and consumer secret, we will use them inorder to connect and receive the Authorization token.:   STEP 2. Enable SSL in Apache. If you already have an Apache Tomcat server with SSL Enable then Jump to...

Read More