I am developing a web application in which I need to consume external web service. I looked WSClient module but some how I am not been able to use it. Is there any other way to consume external web service in Drupal 7?
Thanks,
Vishal
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Resolved this using “SoapClient” in Drupal module.
Here are the steps that I followed:
1. Download WSDL file and save this in your module folder.
2. Using any WSDL to PHP converter, create a PHP file for the downloaded WSDL file
3. Copy the generated PHP file in your Drupal module
4. Include that generated PHP file in your function (within Drupal module) using following code:
5.Include WSDL file using following code:
Here Location of the WSDL file is the server IP / name where you want to connect (e.g.
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