I'm trying to send user data to a remote SOAP server with the Rules module. I have installed the wsclient_soap module (a sub-module of the Web service client module) and put in the URL for the WSDL file. It seems to work as I get a few of the data types back on the Drupal end.

What I do not see, is a way to use the SOAP "operation" to send the values of a Drupal user back to the SOAP server.

Has anyone had any luck sending this type of data to a remote SOAP server?

Here is the code for my php evaluation I'm using to test:

$client = new SoapClient('http://something.wsdl', array('trace' => 1));
syslog(1, print_r($client->__getFunctions(), TRUE)); //this shows the correct function
$newuser = array(
     'email' => '[email protected]',
     'phone' => '+33 06 12 34 56 78',
$client->__soapCall("availableFunctionFromGetFunctions", $newuser);
syslog(1, print_r($client->__getLastRequest(), TRUE));
syslog(1, print_r($client->__getLastResponse(), TRUE));

For the available functions, when printed to syslog, it shows the one I want with THREE variables, the two I want to send and one called "authentication". The documentation I was given does not say what the value of authentication is supposed to be, so I have a feeling the "error" that is being thrown when I act out the rule is caused by this.

I will update as I get more information.

1 Answer 1


You say you use the wsclient SOAP binding but your code doesn't use it. Instead, your code uses a direct query to the PHP SOAP interface.

This thread discusses the difference between the two binding and which one is preferrable.

From the module's readme file:

  • You can create web service descriptions in code, see for example wsclient_examples.module
  • You can easily invoke web services by loading the description and executing an operation (the operation name can be used a dynamic method name):

    $service = wsclient_service_load('google');  
    $result = $service->translate('Hallo Welt', 'de|en');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.