array( 'file' => 'OpalXmlFormatView.inc', ), ); } function mica_opal_view_rest_server_response_formatters_alter(&$formatters) { $formatters['xml'] = array( 'mime types' => array('application/octet-stream'), //"application", "xhtml", array( "q" => "0.5" ) 'view' => 'OpalXmlFormatView', ); } /** * Implements hook_ctools_plugin_api(). */ function mica_opal_view_ctools_plugin_api($owner, $api) { if ($owner == 'services' && $api == 'services') { return array( 'version' => 3, ); } } /** * Implements hook_default_services_endpoint */ function mica_opal_view_default_services_endpoint() { $endpoint = new stdClass; $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */ $endpoint->api_version = 3; $endpoint->name = 'dataset_variables'; $endpoint->server = 'rest_server'; $endpoint->path = 'opal-dataset'; $endpoint->authentication = array( 'services' => 'services', ); $endpoint->server_settings = array( 'rest_server' => array( 'formatters' => array( 'xml' => TRUE, 'bencode' => FALSE, 'json' => FALSE, 'jsonp' => FALSE, 'php' => FALSE, 'rss' => FALSE, 'yaml' => FALSE, ), 'parsers' => array( 'application/json' => TRUE, 'application/vnd.php.serialized' => FALSE, 'application/x-www-form-urlencoded' => FALSE, 'application/x-yaml' => FALSE, 'multipart/form-data' => FALSE, ), ), ); $endpoint->resources = array( 'node' => array( 'operations' => array( 'retrieve' => array( 'enabled' => 1, ), ), ), ); $endpoint->debug = 0; return array($endpoint); }