Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Step-By-Step Guide
To Get Started with Salesforce SOAP
API using Java
Ver 1.1 Updated on 03-Jan-2015
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Related Blog Post
2
Step-By-Step Guide to Get Sta...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Ingredients
3
You will need the following to use ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Using This Guide
4
A couple of standards/conventi...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
5
✓ Install Java
✓ Install Eclipse...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Force.com WSC (Web Services Connector)
6
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Force.com WSC (Web Services Connector)
7
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Force.com WSC (Web Services Connector)
8
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Force.com WSC (Web Services Connector)
9
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
10
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Maven
11
1. Open the browser window and n...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Maven
12
1. Click ‘Download’
Google Chrom...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Maven
13
1. Select the location where
you...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Install Maven
14Mac OS X Yosemite 10.10
1. Double...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
15
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Generate JAR Files
16Mac OS X Yosemite 10.10
1. B...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Generate JAR Files
17Mac OS X Yosemite 10.10
1. “...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
18
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
19
2. Specify...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
20
1. Click o...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
21
1. Click o...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
22
1. Click o...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
23
1. Click o...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
24
1. Right c...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
25
1. Select ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Download WSDL Files From Salesforce
26
1. If prom...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
27
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Generate Java Stub File
28
1. If prompted, click ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
29
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
30Mac OS X Yosemite 10.10
1.N...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
31Mac OS X Yosemite 10.10
1. ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
32
1. In Eclipse, click on Wi...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
33
1. Select Java
2. Click OK...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
34
1. To create a new Java pr...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
35
1. Specify the Project nam...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
36
2. Click Properties
1. Rig...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
37
1. Select Java
Build Path
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
38
1. Navigate to
directory w...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
39
1. Note that
enterprise.ja...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
40
1. Note that
enterprise.ja...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
41
1. Note that force-wsc-<ve...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
42
1. Right click on the
proj...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Create Java Program
43
1. Specify the class name
...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
44
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
45
2. Replace...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
46
1. Right c...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
47
1. As you ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
48
1.Copy and...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
49
1.Before w...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
50
1. Moment ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
51
1. As the ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
52
1. Output ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
53
1. Switch ...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Execute Transactions using SOAP API
54
1. Two Lea...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Steps Overview
55
✓ Install Java
✓ Install Eclips...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Leave Your Feedback
56
Hope you were able to conn...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
For Daily Dose of Useful Tips & Tricks on
Salesfo...
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 58
Document Change Log
Version Changes
1.0 First ...
Upcoming SlideShare
Loading in …5
×

Step-By-Step Guide To Get Started With Salesforce SOAP API Using Java v1.1

35,454 views

Published on

To download this presentation, please navigate to URL http://www.asagarwal.com/step-by-step-guide-to-get-started-with-salesforce-soap-api-using-java/?utm_source=slideshare&utm_medium=presentation&utm_campaign=salesforce_soap_api_using_java

In less than 60 minutes learn how to develop a fully functional java program that uses SOAP API, queries and manipulate data inside Salesforce.com. This is a step-by-step guide with screenshots that will guide you on how to download, install, configure and create everything that you need for this.

Published in: Technology
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/YPzKG ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Step-By-Step Guide To Get Started With Salesforce SOAP API Using Java v1.1

  1. 1. Step-By-Step Guide To Get Started with Salesforce SOAP API using Java Ver 1.1 Updated on 03-Jan-2015
  2. 2. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Related Blog Post 2 Step-By-Step Guide to Get Started with Salesforce SOAP API using Java - http://www.asagarwal.com/2398/step-by- step-guide-to-get-started-with-salesforce-soap-api-using- java Please refer to the blog post for complete article, useful information and related links
  3. 3. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Ingredients 3 You will need the following to use Salesforce SOAP API with Java ■ Salesforce Enterprise Edition or above Or ■ Salesforce Developer Edition ■ Sign up for Free at https://developer.salesforce.com/ ■ Java ■ Eclipse IDE
  4. 4. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Using This Guide 4 A couple of standards/conventions have been followed in this guide. Here is what they mean Text with Red Background Text with Yellow Background 1. Text with White background, red border and a number. In a callout format Text with Green Background Important information. Take a closer look and follow as advised. You may not be able to complete the guide successfully if you miss these instructions General explanation/information to support actions mentioned on the slide. Will assist you in understanding what is being done and why Actions that you need to follow to configure. Carry out these steps in the order of their serial number. Appears on the bottom bar of the page on right hand side. Provides information on the Hardware and Software currently being used
  5. 5. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 5 ✓ Install Java ✓ Install Eclipse ➡ Install Force.com WSC (Web Services Connector) ■ Install Maven ■ Generate JAR Files ■ Download WSDL Files From Salesforce ■ Generate Java Stub File ■ Create Java Program ■ Execute Transactions using SOAP API IMPORTANT For the step-by-step guide on 1st two steps of installing Java & Eclipse on your PC, please refer to my blog post at URL http://www.asagarwal.com/2395/step-by- step-guide-to-install-configure-force-com-ide-on-eclipse In this presentation we will start with installation of Web Services Connector (WSC)
  6. 6. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Force.com WSC (Web Services Connector) 6 1. Click on Applications Mac OS X Yosemite 10.10 Let’s start by downloading WSC files from GitHub
  7. 7. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Force.com WSC (Web Services Connector) 7 1. In Applications, scroll down the window and click on Utilities Mac OS X Yosemite 10.10
  8. 8. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Force.com WSC (Web Services Connector) 8 1. Click on Terminal Mac OS X Yosemite 10.10
  9. 9. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Force.com WSC (Web Services Connector) 9 1. Navigate to a directory where you want to download the WSC files. 2. Run command ‘git clone https:// github.com/forcedotcom/wsc' to download the WSC files on your PC Mac OS X Yosemite 10.10
  10. 10. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 10 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ➡ Install Maven ■ Generate JAR Files ■ Download WSDL Files From Salesforce ■ Generate Java Stub File ■ Create Java Program ■ Execute Transactions using SOAP API
  11. 11. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Maven 11 1. Open the browser window and navigate to URL http://maven.apache.org/ 2. Click ‘Download’ Google Chrome on Mac Next we will install Maven, which is created to compile and package WSC files in JAR files
  12. 12. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Maven 12 1. Click ‘Download’ Google Chrome on Mac
  13. 13. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Maven 13 1. Select the location where you want to download the file 2. Click Save Google Chrome on Mac
  14. 14. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Install Maven 14Mac OS X Yosemite 10.10 1. Double click on the file to uncompress the file
  15. 15. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 15 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ➡ Generate JAR Files ■ Download WSDL Files From Salesforce ■ Generate Java Stub File ■ Create Java Program ■ Execute Transactions using SOAP API
  16. 16. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Generate JAR Files 16Mac OS X Yosemite 10.10 1. Back in the command window, switch to directory where ‘wsc’ & ‘apache-maven’ was downloaded and uncompressed. In this example, the command that I will issue is cd /Ashish/tmp 2. Run command ls -lrt 3. Ensure that the folders ‘wsc’ & ‘apache-maven-<version>’ exist in the current directory 4. Navigate to wsc directory by type the command cd wsc 5. Run the command <path>/apache-maven-3.2.5/bin/mvn clean package -Dgpg.skip replacing the value of <path> with the actual path where you uncompressed the apache-maven file. Running this command will compile the code and package it in a jar file 1 2 3 4 5
  17. 17. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Generate JAR Files 17Mac OS X Yosemite 10.10 1. “mvn clean package” command will run for a few minutes. Once it finishes. ensure that you see the message ‘BUILD SUCCESS’ 2. Run command ls -lrt 3. Ensure that a new folder with the name ‘target’ has got created 4. Run command ls -lrt target 5. Ensure that there is file ending with *uber.jar 1 2 3 4 5
  18. 18. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 18 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ✓ Generate JAR Files ➡ Download WSDL Files From Salesforce ■ Generate Java Stub File ■ Create Java Program ■ Execute Transactions using SOAP API
  19. 19. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 19 2. Specify your username and password and click ‘Log in to Salesforce’ 1. Open the browser window and navigate to URL https:// login.salesforce.com/ Google Chrome on Mac In next few steps we will download the Enterprise WSDL file from Salesforce
  20. 20. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 20 1. Click on Setup Google Chrome on Mac
  21. 21. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 21 1. Click on Develop -> API Google Chrome on Mac
  22. 22. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 22 1. Click on the WSDL that you want to work with. Here I will click on Enterprise WSDL Google Chrome on Mac
  23. 23. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 23 1. Click on Generate Google Chrome on Mac
  24. 24. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 24 1. Right click anywhere on a blank area and click on ‘Save As’ Google Chrome on Mac
  25. 25. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 25 1. Select the location where you want to download the file 2. Save file as ‘wsdl’ file 3. Click Save Google Chrome on Mac
  26. 26. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Download WSDL Files From Salesforce 26 1. If prompted, click use wsdl Google Chrome on Mac
  27. 27. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 27 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ✓ Generate JAR Files ✓ Download WSDL Files From Salesforce ➡ Generate Java Stub File ■ Create Java Program ■ Execute Transactions using SOAP API
  28. 28. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Generate Java Stub File 28 1. If prompted, click use wsdl Mac OS X Yosemite 10.10 1.Back in the terminal window, navigate to the directory where you downloaded enterprise.wsdl 2. Run command ls -lrt 3. Ensure that the file enterprise.wsdl exists in the directory 4. Run command java -classpath wsc/target/force-wsc-33.0.0-uber.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jars Ensure that you specify the correct path to force-wsc-33.0.0-uber.jar file that was generated by running the “mvn clean package” command in previous steps 5. Ensure that the command ends with Generating the jar file 6. Run command ls -lrt 7. Ensure that enterprise.jar now exists in the directory 1 2 3 4 5 6 7 Good job ! At the end of 7th step, we are now all set to use SOAP API to connect to Salesforce from a java program. Are you excited? Let’s move on Generate a JAR file from the Enterprise WSDL File
  29. 29. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 29 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ✓ Generate JAR Files ✓ Download WSDL Files From Salesforce ✓ Generate Java Stub File ➡ Create Java Program ■ Execute Transactions using SOAP API
  30. 30. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 30Mac OS X Yosemite 10.10 1.Navigate to the directory where you installed Eclipse and double click on Eclipse file of Application Type. We will now create a java program and use SOAP API to connect to Salesforce and execute some transactions in Salesforce
  31. 31. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 31Mac OS X Yosemite 10.10 1. Specify the location where you want to keep all your project files (e.g. program source codes). Create a new folder if desired. (Here I am creating a new workspace folder to keep all java programs in a separate folder) 2. Click OK
  32. 32. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 32 1. In Eclipse, click on Window -> Open Perspective -> Other Eclipse Kepler on Mac
  33. 33. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 33 1. Select Java 2. Click OK Eclipse Kepler on Mac
  34. 34. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 34 1. To create a new Java project, click on File -> New -> Java Project Eclipse Kepler on Mac We are creating a Java Project and will be adding the generated JAR files to the project
  35. 35. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 35 1. Specify the Project name 2. Specify the JRE to be used 3. Click Finish Eclipse Kepler on Mac
  36. 36. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 36 2. Click Properties 1. Right click on the project name Eclipse Kepler on Mac
  37. 37. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 37 1. Select Java Build Path 2. Select Libraries 3. Click Add External JARs Eclipse Kepler on Mac
  38. 38. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 38 1. Navigate to directory where enterpise.jar was created in previous steps 2. Double click enterprise.jar Eclipse Kepler on Mac
  39. 39. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 39 1. Note that enterprise.jar gets added to the library 2. Click Add External JARs Eclipse Kepler on Mac
  40. 40. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 40 1. Note that enterprise.jar gets added to the library 2. Click OK 1. Navigate to directory where force-wsc-<version>-uber.jar was created in previous steps 2. Double click force-wsc-<version>-uber.jar Eclipse Kepler on Mac
  41. 41. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 41 1. Note that force-wsc-<version>-uber.jar gets added to the library 2. Click OK Eclipse Kepler on Mac
  42. 42. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 42 1. Right click on the project name 2. Click New 3. Click Class Eclipse Kepler on Mac
  43. 43. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Create Java Program 43 1. Specify the class name 2. Click Finish Eclipse Kepler on Mac
  44. 44. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 44 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ✓ Generate JAR Files ✓ Download WSDL Files From Salesforce ✓ Generate Java Stub File ✓ Create Java Program ➡ Execute Transactions using SOAP API
  45. 45. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 45 2. Replace the username with your salesforce username and password with your salesforce password + security token 1. Copy and paste the following code in your main class. The code is available on the blog post 3. Click Save Eclipse Kepler on Mac This is just a trial code to ensure that we are able to connect o Salesforce using SOAP APIs
  46. 46. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 46 1. Right click on the class name 2. Click ‘Run As’ 3. Click ‘Java Application’ Eclipse Kepler on Mac
  47. 47. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 47 1. As you run the application, you will see a Console tab with following messages Eclipse Kepler on Mac And if you see something similar to what I see here, believe it or not, you have just successfully logged on to Salesforce using SOAP API. Time to celebrate, yeah? In a while …
  48. 48. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 48 1.Copy and paste the full code from the blog post to Main.java file. This code will 1. Query and display 5 records from Lead object 2. Insert 5 new records with Name as ‘SOAP API Lead <n> 3. Update 5 lead records where keyword ‘-- UPDATED’ will the appended to the last name 4. Delete 2 of the updated lead record 2. Click ‘Save’ Eclipse Kepler on Mac Now let’s run a complete program that will query records and insert, update, delete records in Salesforce using SOAP API
  49. 49. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 49 1.Before we run the Java program, let’s logon to the Salesforce org from browser and navigate to leads tab. Here I have modified the ‘All Leads’ view to show lead Name, First name, Last Name, Company, Created Date & Last Modified Date. 2.The data is sorted in the descending order of the last modified date so that we can view the newly created leads on top Google Chrome on Mac
  50. 50. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 50 1. Moment of truth. Let’s run the application. Right click on the class name 2. Click ‘Run As’ 3. Click ‘Java Application’ Eclipse Kepler on Mac
  51. 51. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 51 1. As the java program is being executed, output will be displayed in the console window 2. Click here to maximise the console window Eclipse Kepler on Mac
  52. 52. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 52 1. Output from queryLeads() function 2. Output from createLeads() function 3. Output from updateLeads() function 4. Output from deleteLeads() function Eclipse Kepler on Mac
  53. 53. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 53 1. Switch to Salesforce Browser window and refresh the list view 2. You should see three lead records with First Name as ‘SOAP API’ and Last Name as ‘Lead <n> — UPDATED’. The Java program created 5 lead records, updated 5 records and then deleted 2 records3. Click on Recycle Bin Google Chrome on Mac
  54. 54. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Execute Transactions using SOAP API 54 1. Two Lead records will appear in Recycle Bin as the java program deleted 2 of the 5 created records Google Chrome on Mac
  55. 55. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Steps Overview 55 ✓ Install Java ✓ Install Eclipse ✓ Install Force.com WSC (Web Services Connector) ✓ Install Maven ✓ Generate JAR Files ✓ Download WSDL Files From Salesforce ✓ Generate Java Stub File ✓ Create Java Program ✓ Execute Transactions using SOAP API
  56. 56. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce Leave Your Feedback 56 Hope you were able to connect to Salesforce using SOAP API from the Java program and successfully execute transactions Please do not forget to leave your comments, feedback and suggestions on my blog at URL http://www.asagarwal.com/ 2398/step-by-step-guide-to-get-started-with-salesforce- soap-api-using-java If you got stuck anywhere and were able to resolve the issue, please mention that as a comment on the blog post so that others can benefit from your experience
  57. 57. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce For Daily Dose of Useful Tips & Tricks on Salesforce.com subscribe to asagarwal.com 57
  58. 58. Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 58 Document Change Log Version Changes 1.0 First Release 1.1 Updated hyperlink on page 45 to correct value

×