You need to sign in to do that
Don't have an account?
unable to find classes listed on sforce API? (Account, Contact, etc)
API referred : http://www.salesforce.com/us/developer/docs/api/index.htm
subsection: reference->standard objects
Client side details : partner.wsdl, Axis2 1.5
generated stubs using unpacked option (-u).
I was hoping to find some basic objects like Account, Contact, etc so that I can do something like
-> SObject[] sObjArray = queryResult.getRecords();
for(SObject sObj : sObjArray){
Account acc = [Account] sObj;
}
[used above approach successfully in another webservice]
However, I could not find Account class in the generated classes. I guess I am into wrong approach, but atleast I should be finding the classes listed in the reference API.
Please help.
Enterprise WSDL is specific to a single SFDC Org. Its usually good if you are not planning to do something across multiple salesforce orgs.
One problem with Enterprise WSDL is, you need to recompile i.e. WSDL2Java, if you change metadata, like add new Sobjects or fields etc.
Partner on the other hand, remains the same from WSDL point of view, you can do any metadata changes in your salesforce org, without requiring a WSDL2Java compilation.
All Answers
You need to use Enterprise WSDL, if you want concrete classes for each custom/standard Sobjects in your salesforce org. Partner WSDL is generic for all sfdc orgs, so it jus gives Sobject for all CRUD operations.
Let me know if you need more details
Thank you very much Abhinav.
It seems, using enterprise.wsdl simplifies many issues resulting in cleaner code. But I guess, there should be some reason to select just partner.wsdl and discarding enterprise.wsdl. [Our app has been using sforce api since 3-4 years and it's based on partner.wsdl]
referred - http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_partner.htm
Since am not familiar with this stuff, I could not figure out the practical problems by selecting enterprise.wsdl
Could you please clarify?
Enterprise WSDL is specific to a single SFDC Org. Its usually good if you are not planning to do something across multiple salesforce orgs.
One problem with Enterprise WSDL is, you need to recompile i.e. WSDL2Java, if you change metadata, like add new Sobjects or fields etc.
Partner on the other hand, remains the same from WSDL point of view, you can do any metadata changes in your salesforce org, without requiring a WSDL2Java compilation.
if not digression, can I ask you for the relevant implementation (Axis2) of the following in partner.wsdl perspective.
-> SObject[] sObjArray = queryResult.getRecords();
for(SObject sObj : sObjArray){
Account acc = [Account] sObj;
%-- retrieving 'acc' property fields--%
}
[Shall I create a new thread?]
Sorry, can't understand your question, need more details ? If its in separeate context, please start new thread.