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
salvatoreovlassalvatoreovlas 

webservice wsdl generation

Hello,

I'm a newbie on SalesForce.

I'm trying to generate a WSDL for the following method:

global class MyWebService {
webService static Id makeContact(String lastName, Account a) {
Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);
insert c;
return c.id;
}
}

 I'd love to know if it is normal that it generates a wsdl for all the objects that I have in my application? I'd love to have only the Account! 

the WSDL is generating:(cant upload it cause it's too big)

 

 If I try to edit the wsdl I get a not_well formatted one!!! How can I fix it?

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

Once you include an sobject type like account, then all types appear because of the relationships between the objects.

All Answers

SuperfellSuperfell

Once you include an sobject type like account, then all types appear because of the relationships between the objects.

This was selected as the best answer
Anup JadhavAnup Jadhav

Maybe, I'm missing the point here, but can't you download the wsdl from Settings -> App Setup -> Apex Classes. There is a download wsdl link right next to the webservice class that you've written. Or maybe I've misunderstood your question.

 

Cheers,

A

salvatoreovlassalvatoreovlas

Thank you!

I was thinking the same....but should I edit the wsdl myself to have on it just the object I'm interested in?