SOAP web service – How to creating a class from WSDL document?
SOAP web service class can be generated automatically by using WSDL document. Generating WSDL document allows Salesforce developers to make callouts to the external web service in their Apex code.
Follow below steps to generate apex class from a WSDL:
1.Go to Apex Classes form setup menu.
2.Click “Generate from WSDL” button.
4.Click Parse WSDL button which is highleted in the above image to verify WSDL document contents. It generates default class name based on WSDL document. It report errors in case of the WSDL contains schema types or constructs that aren’t supported by Apex classes, or if the resulting classes exceed the 1-million-character limit on Apex classes. For example, the Salesforce SOAP API.
You can rename the class. And click on Generate Apex button. The final page of the wizard shows which classes were successfully generated, along with any errors from other classes. The page also provides a link to view successfully generated code.
Generated Apex classes include stub and type classes for calling the third-party Web service represented by the WSDL document. These classes allow you to call the external Web service from Apex.
Refere here to know more about SOAP callouts: https://trailhead.salesforce.com/modules/apex_integration_services/units/apex_integration_soap_callouts