Contents
What is the benefit of using WSDL with Apex?
An Apex class can be automatically generated from a WSDL document that is stored on a local hard drive or network. Creating a class by consuming a WSDL document allows developers to make callouts to the external Web service in their Apex. Note Use Outbound Messaging to handle integration solutions when possible.
How do I create a WSDL file in Salesforce?
To generate the metadata and enterprise WSDL files for your organization:
- Log in to your Salesforce account.
- From Setup, enter API in the Quick Find box, then select API.
- Click Generate Metadata WSDL, and save the XML WSDL file to your file system.
What is the use of WSDL in Salesforce?
A WSDL is an XML-document which contains a standardized description on how to communicate using a web service (the Salesforce API is exposed as a web service). The WSDL is used by developers to aid in the creation of Salesforce integration pieces.
Why is WSDL needed?
A WSDL document is used to describe a web service. This description is required, so that client applications are able to understand what the web service actually does. The methods which are exposed by the web service.
How to generate an apex class from a WSDL document?
To generate an Apex class from a WSDL: In the application, from Setup, enter Apex Classes in the Quick Find box, then select Apex Classes. Click Generate from WSDL. Click Browse to navigate to a WSDL document on your local hard drive or network, or type in the full path.
Is the Salesforce datatype supported in apex?
The Salesforce datatype anyType is not supported in WSDLs used to generate Apex code that is saved using API version 15.0 and later. For code saved using API version 14.0 and earlier, anyType is mapped to String. Apex also supports the following schema constructs:
How to define a class from a WSDL document?
Click Browse to navigate to a WSDL document on your local hard drive or network, or type in the full path. This WSDL document is the basis for the Apex class you are creating.
Are there any services that do not support apex?
Apex does not support any other WSDL constructs, types, or services, including: WSDL files that import external schemas. For example, the following WSDL fragment imports an external schema, which is not supported: However, an import within the same schema is supported.