Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with import after building the .jar #302

Open
snoopgr2 opened this issue Jul 28, 2022 · 1 comment
Open

Help with import after building the .jar #302

snoopgr2 opened this issue Jul 28, 2022 · 1 comment

Comments

@snoopgr2
Copy link

Hi, I built the .jar following the instructions and I get a clean build. I placed the .jar file in my java repository.

In my pom.xml I added the following :

    <dependency>
        <groupId>com.sforce</groupId>
        <artifactId>sample</artifactId>
        <version>1.0</version>
        <scope>system</scope>
        <systemPath>//Users/[?????]/.m2/repository/com/sforce/salesforceapi.jar</systemPath>
    </dependency>

So far, so good.

after mvn clean install, I am trying to import the libraries as per the example:

import com.sforce.soap.partner.;
import com.sforce.soap.partner.sobject.
;
import com.sforce.ws.*;

I only get import com.sforce.soap.enterprise.*; to work. com.sforce.ws and com.sforce.soap.partner libraries are not available. What am I doing wrong?

@snoopgr2
Copy link
Author

snoopgr2 commented Aug 1, 2022

Ooook. So I missed the first half of the instructions. Or at least didn't understand that the file generated by
git clone https://github.com/forcedotcom/wsc.git
mvn clean package

Needed to be run in the wsc folder AND would need to be installed via Maven into my maven repository.

Also didn't realize that Salesforce offers both an Enterprise and a Partner option on their Settings/API webpage. I recreated the .jar using the output of the SF Partner wsdl file, installed the .jar to Maven and things are now mostly working.

I have an connection refused error but I will keep looking into that. I just wanted to post this extra info for any one else who might not be familiar with Java and Maven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant