Symptoms

During the attempt of provisioning of a new user (create user operation on CCP) for the Webex APS, task on its creation fails with the following error:

"Execution of configuration script for instance with id 46712 of service with id Create User of instance with id 9124 of application with id 107 failed - returned value: -1 output: '' errors: 'PHP Fatal error: Uncaught exception 'Exception' with message 'Not a valid country' in /usr/local/pem/APS/instances/9124/scripts/create_user.php:149
Stack trace:

#0 /usr/local/pem/APS/instances/9124/scripts/create_user.php(9): install()
#1 {main}
thrown in /usr/local/pem/APS/instances/9124/scripts/create_user.php on line 149"

The script itself throws an exception (Not a valid country) from the function install(). Let us review this function more closely.

  1. It parses parameters, passed by the call from OA and defines some variables with them: $user_country = trim(getenv('SETTINGS_usr_country')); In our case, SETTINGS_usr_country was set to "co". It means that in the CCP customer chose "Columbia" from drop-down menu of predefined items. Elements of that menu and their interactions in code are defined inside the Webex APS UI.

  2. After that the install() function builds an XML document from passed parameters:

    <country>".$user_country."</country>

    No transformations are made in this part of function.

  3. When document is ready, it is being posted to the Webex web-servers:

    $URL = "http://{$XML_SITE}/WBXService/XMLService";

    $Result = postIt($d,$URL,$XML_PORT);

    Result is stored for further processing.

  4. Function parses response from the Webex web-servers:

    $xml = substr_replace($Result,"", 0, strpos($Result,"<?xml")); $xml = new SimpleXMLElement($xml);

  5. Based on response, function sends a message, or if response contains error message, throws an exception appending the answer from Webex to it:

if($kids->header->response->result == "FAILURE") ... if($kids->header->response->result == "SUCCESS") ... else {throw new Exception($kids->header->response->reason);}

Cause

The root cause of the issue is in miscommunication between Webex APS package and Webex provisioning backend. There either can be three points of failure:

  1. Webex APS UI scripts: Incorrect translation of the human-readable country name to country code for Webex internal use;
  2. Webex APS configuration scripts: application generates incorrect XML payload;
  3. Webex backend: protocol or API became incompatible with the Webex APS package.

Resolution

For further investigation, please contact Webex APS packager: Glowtouch Technologies. More info about this package you may find on the APSStandard portal:

Internal content