• Модуль: webservice
  • Путь к файлу: ~/bitrix/modules/webservice/classes/general/soap/soapcodec.php
  • Класс: CSOAPCodec
  • Вызов: CSOAPCodec::_validateSimpleType
function _validateSimpleType($dataType, $value)
{
	global $xsd_simple_type;
	if (!isset($xsd_simple_type[$dataType]))
		CSOAPCodec::_errorTypeValidation("[Is not a simple type.{$dataType}]", $value);

	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);
	}
}