My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GettingStartedGuide  

Featured
Updated Nov 14, 2010 by abhinavgupta697

Getting Started with TOLERADO

  • WSDL2Java with WSC
  • Prerequisites
  • Running sample code
  • Running Samples via the Tolerado Samples Project

WSDL2Java with WSC

I am explaining this first in getting started guide, because Tolerado for WSC will not be compatible with usual WSDL compilation via WSC. You must be wondering why, this is done intentionally to avoid java classloading/namespace conflicts when classes generated by WSC are used with WSDL2Java stuff from other libraries like Apache Axis, this conflict issue is explained in details here.

Tolerado tweaks WSC WSDL compilation a litle to have a suffix after each java package. This suffix is "wsc", for ex. instead of java package “com.sforce.soap.partner.”, new package name would be “com.sforce.soap.partner.wsc.” for all generated classes from Partner.WSDL. You can also do this by compling all WSDLs in following fashion via WSC

    java -Dpackage-prefix=wsc -classpath wsc.jar com.sforce.ws.tools.wsdlc wsdl jar.file

Latest versions generated jar(via SFDC WSDL Compilation) is available in downloads area by name sfdc-wsc-API-VERSION-wsdl2java.zip. This zip contains 4 jar files corresponding to each SFDC wsdl i.e. Partner, Metadata, Apex and Enterprise WSDL. Not all of these are required, for working with Tolerado, just pick the ones you need. But you will need to recompile atleast enterprise wsdl because of org specific differences. So using above command becomes important from Tolerado compatiblity point of view.

Prerequisites

  1. Download and unpack the tolerado-wsc-all.zip from download area. This archive contains 5 jar files (1 is tolerado-core and 4 are corresponding tolerado plugins for each SFDC WSDL).
  2. Out of the unzipped archive, you will need atleast the tolerado-wsc-core-x.x.jar. This jar has the basic fixture of Tolerado.
  3. Tolerado can work independently with either Partner or Enterprise WSDL. If you are planning to use Tolerado with Enterprise WSDL, then you can use tolerado-wsc-enterprise-x.x.jar, but because of Org specific differences, we suggest doing WSC Compilation and generating your own classes for this WSDL. For using Partner WSDL, use tolerado-wsc-partner-x.x.jar.
  4. This is optional, if you want to work with metadata or apex wsdl use respective tolerado-wsc-metadata-x.x.jar/ tolerado-wsc-apex-x.x.jar files. You need either of Tolerado enterprise or partner jar files, so depending on your requirement feel free to add any one or both of partner and enterprise Tolerado jars.
  5. This is optional, if you haven't done WSC compilation over Partner, Metadata and Apex WSDLs. You can download these jars(sfdc-wsc-<WSDL NAME>.jar) from the download page. All these Jars are having classes compiled/generated from SFDC WSC complier. If you have already done so, you can use you existing generated code. Please don't forget to suffix java packages as suggested in above section "WSDL2Java with WSC"
  6. Make sure you have all the dependencies mentioned here. All these jars can also be checked out from SVN here

Running sample code

Once you have all the prerequisites set in your classpath. Code samples for Tolerado are available here. Start coping and playing the stuff.

Running Samples via the Tolerado-WSC-JunitTests Project

Tolerado-WSC-JunitTests is a complete Java project independent of Tolerado main development branch. Its checked into SVN as java project, so you guys can checkout it from here and start playing with samples

Here is a video that shows how to checkout and setup Tolerado Samples


Sign in to add a comment
Powered by Google Project Hosting