• Модуль: webservice
  • Путь к файлу: ~/bitrix/modules/webservice/classes/general/soap/soapcodec.php
  • Класс: CSOAPCodec
  • Вызов: CSOAPCodec::_validateType
function _validateType($dataType, $value)
{
	global $xsd_simple_type;
	if (isset($xsd_simple_type[$dataType]))
	{
		/*
		if (is_array($value))
		{
			echo $dataType;
			die();

		}
		else*/if ($dataType != gettype( $value ))
		{
			// all numbers are same as string
			if (is_numeric($value) and (
				$dataType == "integer" or
				$dataType == "double" or
				$dataType == "float"))
				return;
			//elseif ($dataType == 'base64Binary' && preg_match('/^([A-Za-z0-9]|+|/|-|=)+$/', $value))
			elseif ($dataType == 'base64Binary' || $dataType == 'any')
				return;

			CSOAPCodec::_errorTypeValidation($dataType, $value);
		}
	}
	else
	{
		if (!is_object($value) and !is_array($value))
			CSOAPCodec::_errorTypeValidation($dataType, $value);
	}
}