function services_client_wizard_form_details_validate in Services Client 7.2
Try to retrieve remote entities definition.
File
- ./
services_client.admin.inc, line 163 - Administration pages for configuring services client module.
Code
function services_client_wizard_form_details_validate($form, &$form_state) {
try {
$connection = services_client_connection_get($form_state['values']['connection']);
$entities = $connection
->action('services_client', 'entity_info');
// Store info in global object.
$object =& $_SESSION['services_client_wizard'];
$object->connection = $form_state['values']['connection'];
$object->entities = $entities;
$object->handler = $form_state['values']['handler'];
$object->title = $form_state['values']['title'];
$object->name = $form_state['values']['name'];
} catch (ServicesClientConnectionResponseException $e) {
form_set_error('', 'Error response from remote connection when trying to retrieve list of remote entities');
drupal_set_message(t('You have to install and enable services_client_services on remote endpoint.'), 'error');
drupal_set_message($e
->getMessage(), 'error');
}
}