This is resolved using the "SoapClient" in the Drupal module. Here are the steps I followed:
1. Download the WSDL file and save it in the folder of your module.
2. Using any WSDL to PHP converter, create a PHP file for the downloaded WSDL file
3. Copy the generated PHP file to your Drupal module
4. Include this generated PHP file in your function (in the Drupal module) using the following code:
$WSDLPHPPath = drupal_get_path('module', <Module Name>) .'/< generated PHP file>.php';
require_once($WSDLPHPPath);
5. Include the WSDL file using the following code:
$WSDLPath = "http://localhost/drupal/" . drupal_get_path('module', <Module Name>) .'/<Name of WSDL file>.wsdl';
$client = new SoapClient($WSDLPath, array('location'=><Location of the WSDL file>));
Here, the location of the WSDL file is the IP address of the server you want to connect to (for example, http://<server name or IP>/abc?wsdl)
6.Call your web method: (e.g. $client-><Web method name>)
7.Refer SoapClient documentation if you want to add parameters to the web method
source
share