No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
WebService Methods
Apex class methods can be exposed as custom SOAP Web service calls.
This allows an external application to invoke an Apex Web service to perform an action in Salesforce.
Use the webService keyword
to define these methods. For example:
1swfobject.registerObject("clippy.codeblock-0", "9");global class MyWebService {
2 webService static Id makeContact(String lastName, Account a) {
3 Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);
4 insert c;
5 return c.id;
6 }
7}A developer of an external application can integrate with an Apex class containing webService methods by generating a WSDL for the class. To generate a WSDL from
an Apex class detail page:
- In the application from Setup, click .
- Click the name of a class that contains webService methods.
- Click Generate WSDL.