What Is WSDL In Salesforce?
A developer of an external application can integrate with an Apex class containing webService methods by generating a WSDL(Web Service Definition Language) for the class. To generate a WSDL from an Apex class detail page:
- Generate the WSDL file for the whole organization from Setup->Generate Enterprise WSDL to use it.
- In the application from Setup, enter “Apex Classes” in the Quick Find box, then select Apex Classes.
- Click the name of a class that contains webService methods.
- Click Generate WSDL.
Considerations For Using the WebService Keyword
- You cannot use the webService keyword when defining a class. However, you can use it to define top-level, outer-class methods, and methods of an inner class.
- You cannot use the webService keyword to define an interface or to define an interface’s methods and variables.
- You cannot use the webService keyword in a trigger.
- All classes that contain methods defined with the webService keyword must be declared as global. If a method or inner class is declared as global, the outer, top-level class must also be defined as global.
- You must define any method that uses the webService keyword as static.