
########
Provider
########


****
NAME
****


Kernel::GenericInterface::Provider - handler for incoming web service requests.


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     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.


.. code-block:: perl

     # put this in the handler script
     $ProviderObject->Run();



_GenerateErrorResponse()
========================


returns an error message to the client.


.. code-block:: perl

     $ProviderObject->_GenerateErrorResponse(
         ErrorMessage => $ErrorMessage,
     );



_HandleError()
==============


handles errors by
- informing operation about it (if supported)
- calling an error handling layer


.. code-block:: perl

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





