Salesforce Developer Apex Soap Exposing

salesforce-developer-apex-soap

// Salesforce - Developer - Apex - SOAP - Exposing Apex class as SOAP service:

Making your Apex class available as a SOAP web service is as easy as with REST:

1. Define your class as global

2. Add the webservice keyword and the static definition modifier to each method 
   you want to expose. The webservice keyword provides global access to the 
   method it is added to.

   global with sharing class MySOAPWebService {
       webservice static Account getRecord(String id) {
           // Add your code
       }
   }

3. Generate this WSDL for your class from the class detail page, accessed from 
   the Apex Classes page in Setup. You typically send the WSDL file to 
   third-party developers (or use it yourself) to write integrations for your 
   web service.

Because platform security is a first-class Salesforce citizen, your web service 
requires authentication. In addition to the Apex class WSDL, external 
applications must use either the Enterprise WSDL or the Partner WSDL for login 
functionality.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License