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
aj4aj4 

Apex Webservice WSDL contains defination of all the salesfoece object

Hi!
 
I have created sample class and HelloWorld Web service . When I had generated WSDL It has the definition of all the Salesforce Object like account,opportunity...... . Is it possible to generate the WSDL only with the attributes need for the Method ?
 
 
Thanks
SuperfellSuperfell
It'll contain all the objects if you reference one of them somewhere in your webservice signature.
aj4aj4
Hi Simon,
 
Is there any way to avoid other objects which are not referenced?
 
If the object have 250 + fields on it will the wsdl contain all the 250 fields(attributes) ? if so it is overhead?
 
Any thoughts..
 
 
Thanks
SuperfellSuperfell
the problem is that via SOQL-R you can spider the object relationships and pretty much touch everything, so it becomes an all or nothing proposition. If your webservice signature has no references at all to sobjects, then they won't be included, otherwise it has to include all of them.