Generating partner.jar for Salesforce API Integration

󰃭 2014-11-12

I ran into a small issue recently when setting up a Java project to use the Salesforce APIs.

Basically, you need to download a WSDL file from Salesforce, then use a tool made by them to generate a jar that you then include in your Java program.

They instruct you to download force-wsc.jar and then run it, but when you run it you realize they didn’t pack the dependencies within the jar!

To solve this problem, you need to download the following jars:

And then run force-wsc.jar, including the dependencies in the classpath:

$ java -classpath force-wsc-32.1.1.jar:js-1.7R2.jar:ST-4.0.7.jar \
  com.sforce.ws.tools.wsdlc partner.wsdl partner-32.1.1.jar

Please note these were the versions that worked for me. If your force-wsc.jar is a different version, check if you need to include other version of its dependencies.



More posts like this

Setting up sendmail to redirect emails

󰃭 2016-05-14 | #email #linux #tutorials

Disclaimer: the instructions below are for Ubuntu, but they should work for most distros, the biggest difference is that the configuration files might be located elsewhere. If you’re like me, you have a main email address and other email addresses set up in other domains. I dislike having to check all my email addresses individually, so I set up my mail servers to redirect all the email to my main address automatically.

Continue reading 


Publishing an App on F-Droid

󰃭 2021-08-03 | #android #f-droid #tips #tutorials

I made some small apps for Android and I wanted to distribute them. I also care a lot about software freedom, so F-Droid is the best place for me to publish my apps. Disclaimer! You are not able to sell your app on F-Droid. If you want to make money with it, you would need to allow users to pay through another method. Please see this StackExchange question if you’re interested in monetization.

Continue reading 