Last updated 11 January 2017. Created on 2 April 2011.
Edited by ibraaheem, targoo, amalaer. Log in to edit this page.

Introduction

This section describes by example how to consume a REST web service using the Web service client module from within Rules.

Proceed in almost the same way as for a SOAP web service.

Note that there are some major differences between configuring with the SOAP & REST web service approach:

  • In REST, you do not have WSDL (actually did some reading around to know this).
  • You have to add your "Operations" yourself since there is no WSDL to import from. The Operation you create is what you eventually use in Rules.
  • Just like all other entities, when sending a POST request (to create an entity), you have to add "type" as one of the Operation's variables. This would be used to specify the bundle type (i.e article) to the web service.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

matheusramos’s picture

Please add content.

j.b’s picture

Please provide an insight how to consume rest webservice
and how to get xml or json reponse.
OR does the module even allow us to decide of the response required from the webservice.
This is a blocking matter.

Can't quite get this module to work correctly,
the latest recommended release contains errors on the forms

skeesm1’s picture

Please add an example how to consume a rest service that does not have a schema or WADL