[module] Web service client

Compatibility:

0
Project page quote (external)
Project page quoted on: 
2014-03-16

Posted by klausi on August 4, 2010 at 11:49am

This module provides an interface to consume external web services. It focuses on integrating web service operations as Rules actions, but can also be used as data provider for other modules.

WSClient comes with a user interface that allows site administrators to create REST and SOAP service descriptions with their respective operations and data types. Those service descriptions can be edited, cloned and deleted as well as imported/exported for sharing with other sites. Basic usage documentation can be found in the README.

Some useful tutorials can be found in the documentation.

WSClient is an enhancement of Rules web and Rules usecases (proof of concept modules).

Module dependencies

- wsclient.module depends on entity.module.

- wsclient_rest.module depends on http_client.module.

- wsclient_soap.module depends on the PHP SOAP extension, so make sure that it is available in your PHP install.

Depends on modules [Drupal7]
As of 20 Mar 2014 the example at Consume SOAP web service using Web service client and Rules works, however to understand it one needs to scroll down past the general How outline section (which does not fully explain how) to the more specific Instructions section.

The example is implemented on this site as Demo: Web services client: Drupal SOAP web service: Celsius to Fahrenheit, but public WWW users can't see anything of use because - as illustrated it the original example - only triggers on event:

After saving new content of type Web service: Celsius to Fahrenheit

One can add in another trigger event so that the web service will be invoked whenever a Web service: Celsius to Fahrenheit page is edited, giving authorised users at least the ability to try different Celsius input temperature values:

After updating existing content of type Web service: Celsius to Fahrenheit

And so that public WWW users can also see the output Fahrenheit temperature, one can add the action:

Content is viewed of type Web service: Celsius to Fahrenheit

But then of course the web service will be called whenever a robot or spider visits the page.

All-in-all, although it has educational value, the approach of Web service client is not very practical. And having to create a dedicated content type like Web service: Celsius to Fahrenheit for every web service quickly leads to content type pollution if one us using many web services.

As of 20 Mar 2014 the example at Consume REST web service using Web service client and Rules (PLEASE ADD CONTENT) is incomplete, offering only 'Proceed in almost the same way as for a SOAP web service', where of course it's the part that is different one would need to know about. In particular, it does not say how the service descriptor for the REST service is obtained !

It is worth investigating, but I find some aspects of this module are incomplete.

Visit also