Generating Apex
For the remainder of this chapter, we are going to use an example endpoint provided by W3Schools. It provides an example API for temperature conversion, the WSDL for which can be retrieved at https://www.w3schools.com/xml/tempconvert.asmx?WSDL. This file can be saved locally as an XML file and used for uploading.
Updating the WSDL file for Salesforce
If you try uploading this file, however, you will receive some error messages stopping parsing; this is due to the WSDL from W3Schools offering multiple different bindings and ports for its API. This (along with other features of the specification such as the generic anyType
data type) is not supported in the Apex language and processing. As such, the file must be updated to remove some unavailable features. I have already done this, and you can find this file in a GitHub gist at http://bit.ly/TemperatureConversionWSDL, although it is a simple item to update and may be an interesting exercise for readers.
With...