function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kumar hari 6kumar hari 6 

consuming SOAP WSDL from Apex classes

HI,
 how to consume SOAP WSDL from Apex classes
with example 


Thanking Advance 
SwethaSwetha (Salesforce Developers) 
Hi Kumar,
You will need to write an Apex class, that 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 web service keyword to define these methods.

Then you will generate WSDL from the APEX Class which you have created and share the generated WSDL to the third party

Here is the below process to generate WSDL file from Apex Class:

To generate a WSDL from an Apex class detail page:
1) In the application from Setup, enter “Apex Classes” in the Quick Find box, then select Apex Classes.
2) Click the name of a class that contains web service methods.
3) Click Generate WSDL.

Please see https://help.salesforce.com/articleView?id=code_wsdl_to_package.htm&type=5
https://salesforce.stackexchange.com/questions/34644/how-to-make-a-soap-call-using-apex-class
https://www.jitendrazaa.com/blog/salesforce/consuming-external-webservice-in-apex/
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_web_services_methods.htm
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you