NAME
Kernel::GenericInterface::Provider – handler for incoming web service requests.
PUBLIC INTERFACE
SYNOPSIS
Don't use the constructor directly, use the ObjectManager instead:
my $ProviderObject = $Kernel::OM->Get('Kernel::GenericInterface::Provider');
Run()
Receives the current incoming web service request, handles it, and returns an appropriate answer based on the requested web service.
# put this in the handler script
$ProviderObject->Run();
PRIVATE INTERFACE
_GenerateErrorResponse()
returns an error message to the client.
$ProviderObject->_GenerateErrorResponse(
ErrorMessage => $ErrorMessage,
);
_HandleError()
handles errors by – informing operation about it (if supported) – calling an error handling layer
my $ReturnData = $RequesterObject->_HandleError(
DebuggerObject => $DebuggerObject,
WebserviceID => 1,
WebserviceConfig => $WebserviceConfig,
DataInclude => $DataIncludeStructure,
ErrorStage => 'PrepareRequest', # at what point did the error occur?
Summary => 'an error occurred',
Data => $ErrorDataStructure,
OperationObject => $OperationObject, # optional
Operation => 'OperationName', # optional
);
my $ReturnData = {
Success => 0,
ErrorMessage => $Param{Summary},
};