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

How to show preview images when sharing links of your website

󰃭 2019-04-13 | #html #tutorials

You know when you share a link on social media or mesagging apps, sometimes the app shows a nice preview thumbnail with a description? You can click on it and it will take you to the linked website. I wanted to have this functionality for a website I was working on, so I did some research on how to get it working. Short answer: use the og:image meta tag. Longer answer: read on.

Continue reading 


Free Static Web Hosts for Frontend Developers

󰃭 2022-01-15 | #css #html #javascript #tips #tutorials

Nowadays it’s very easy to publish on the web for free. There are countless blogging platforms and website creators. But these platforms usually end up controlling your content. Sometimes you cannot even export your own data! The other extreme is to set up your own server by yourself. Buy a VPS (virtual private server) or a shared hosting somewhere, install a web server, and upload your files. This is a lot of work already!

Continue reading 