function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FandangoFandango 

How to connect to Salesforce from a Java Application running on Solaris ?

I need to know if there is a jar file and documentation available to connect to salesforce from a solaris based java app ?


I downloaded the quickstart bundle but that throws the following exception:
; nested exception is:
java.net.UnknownHostException: www.salesforce.com


Basically, I'm looking for a jar file that I can setup with my application to make connection and calls to salesforce. I may have to connect to salesforce from a website as well. So, can someone please throw some light on how it can be accomplished.

Thanks,

..Jean
dadadada

1.Download the wsdl file of your organization which can be found from Setup - Studio - Integrate - WSDL Generator.

2. Save it to your hard drive. NB: Save as a *.wsdl file.

3. Download and install Apache Axis (axis-1_1.zip): http://mirrors.xtria.com/apache/ws/axis/1_1/.

4. Download and install the WSDL2Java Eclipse Plug-in: http://prdownloads.sourceforge.net/sforce/com.myspotter.wsdl2java_1.2.0.zip?download
Move the com.myspotter.wsld2java folder to your C:\...\eclipse\plugins directory

5. Right-click on the project in the Navigator window and select properties.  In the Properties window, select Java Build Path, and then the Libraries Tab.  Click â¬?Add External JARsâ¬?, and in the dialog, navigate to and select all the contents of c:\...\axis\lib.

6. Right click on the project, select �Import..� and then �File System..�; add the WSDL to your project

7. Right click on the WSDL and select WSDL2Java | Generate.

After generating, you shall have the files needed to connect to salesforce.
Hope this works out for you.

 

DevAngelDevAngel

Hi Fandango,

The best way to do about this is to use the Apache Axis libraries to generate client proxy code based on the salesforce.com wsdl that you obtain through the salesforce.com application.  Once you have obtained a local copy of your wsdl, you run the Axis WSDL2Java program to create you client code.  Include the generated source files in your java application and add classpath references to the Axis jars.

After doing those things you will be able to create an instance of the SoapBindingStub class from the generated classes.  The SoapBindingStub will contain all the available methods of the web service.  Take a look at the java samples on this sight to see how the methods are invoked and the returned values consumed.

The web services is implemented on https, so as long as you can use the salesforce.com application, you should not have any connection issues with the web services.

sanjaykumarsanjaykumar
I am sanjay and I read one of your thread form sforce.com . I am new to salesforce and trying to make a java application for logging on to the salesforce using the api and the wsdl file. I have downloaded the partner wsdl file and converted into java class using a wsdl2java plugin, but now don’t know how to go ahead, can u help me in this regard,

I am using eclipse 3.1 as my development environment.

plz help me in proceeding with the application, where i can let a user interact with salesforce using the java application.