Bitrix Site Manager

CWebService::RegisterWebService

boolean
CWebService::RegisterWebService(string className);

The method RegisterWebService registers the specified web service. Returns true on success or false otherwise.

If a web service is implemented using components, RegisterWebService is called automatically in webservice.server. In this case, className = $arParams["WEBSERVICE_NAME"].

Parameters

Parameter Description
className The name of a web service class that implements IWebService.

Example




// In webservice.server
CWebService::RegisterWebService($arParams["WEBSERVICE_CLASS"]);

// In the web service component
$arParams["WEBSERVICE_NAME"] = "bitrix.webservice.checkauth";
// The following parameter is passed directly to SOAPServerProcessRequest
$arParams["WEBSERVICE_CLASS"] = "CCheckAuthWS";
$arParams["WEBSERVICE_MODULE"] = "";
$APPLICATION->IncludeComponent(
    "bitrix:webservice.server",
    "",
    $arParams
    );