• Модуль: webservice
  • Путь к файлу: ~/bitrix/modules/webservice/classes/general/sharepoint/client.php
  • Класс: CSPListsClient
  • Вызов: CSPListsClient::GetByID
public function GetByID($listName, $XML_ID)
{
	$RESULT = false;

	$arMethodParams = array('listName' => $listName);

	$query = new CXMLCreator('Query');
	$query->addChild(new CXMLCreator('Where'));

	if (!is_array($XML_ID))
		$query->children[0]->addChild($this->_GetByID_query($XML_ID));
	elseif (count($XML_ID) == 1)
		$query->children[0]->addChild($this->_GetByID_query($XML_ID[0]));
	else
	{
		$obOr = new CXMLCreator('Or');

		foreach ($XML_ID as $item)
		{
			$obOr->addChild($this->_GetByID_query($item));
		}

		$query->children[0]->addChild($obOr);
	}

	$arMethodParams['query'] = $query;

	if (
		$this->__initialize()
		&& $this->Call('GetListItems', $arMethodParams)
		&& ($DOM = $this->RESPONSE->DOMDocument)
	)
	{
		$DATA_NODE = $DOM->elementsByName('data');
		if (is_array($DATA_NODE) && count($DATA_NODE) > 0)
		{
			$RESULT = $this->ConvertRows($DATA_NODE[0]);
		}
	}

	$fp = fopen($_SERVER['DOCUMENT_ROOT'].'/sp_client6.log', 'a');
	fwrite($fp, $this->getRawRequest());
	fwrite($fp, $this->getRawResponse());
	fwrite($fp, "n==========================================nn");
	fclose($fp);

	return $this->GetByIDProcessResult($RESULT);
}