Related to #2045847: The provided argument for parameter is empty.
The SOAP spec requires that optional (NULL) values be allowed. For wsclient to work with rules module, this requires a modification to the implementation of hook_rules_data_info(). Example hook_rules_data_info below where I've added the 'allow null' parameter to Address2, Phone and Fax. If this change isn't implemented, then an exception gets thrown by rules.core.inc, ~ line 893
throw new RulesEvaluationException('The provided argument for parameter %name is empty.', array('%name' => $name), $this);

Example

function hook_rules_data_info() {
  $items = array();

  $items["billingAddress"] = array(
      "type" => "wsclient_account_services_BillingAddress",
      "label" => "billingAddress",
      "property info" => array(
        "Address1" => array(
          "type" => "text",
          "label" => "Address1",
        ),
        "Address2" => array(
          "type" => "text",
          "label" => "Address2",
          "allow null" => TRUE,
        ),
        "State" => array(
          "type" => "text",
          "label" => "State",
        ),
        "Postcode" => array(
          "type" => "text",
          "label" => "Postcode",
        ),
        "PhoneNumber" => array(
          "type" => "text",
          "label" => "PhoneNumber",
          "allow null" => TRUE,
        ),
        "FaxNumber" => array(
          "type" => "text",
          "label" => "FaxNumber",
          "allow null" => TRUE,
        ),
      ),
  );

  return $items;
}
CommentFileSizeAuthor
rules-allowNullParametersFromData.patch1.23 KBheddn

Comments

heddn’s picture

Issue summary: View changes

Updated issue summary.

fago’s picture

Status: Needs review » Fixed

While that's not a documented entity-property-info key, I think it's ok to add support for this optional key.

Thanks, committed.

heddn’s picture

@fago, I don't see the commit on this. Did I miss it in the logs?

fago’s picture

Indeed - sry I pushed it to the wrong repo. Here it is now: http://drupalcode.org/project/rules.git/commit/700282c

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.