Changes

UBIK Enterprise Service

647 bytes added, 07:28, 10 July 2020
=== How to consume the web interface ===
First of all the address of the webinterface to a certain action follows a specific pattern: "api/{controller}/{action}". For example, that means if you want to call the GetUpTimeInfo() method to see wether the WebInterface is online or not you will have to do a GET request to [http://localhost:9000/api/basicenterpriseservice/getuptimeinfo http://localhost:9000/api/basicenterpriseservice/getuptimeinfo].
By default the WebInterface allows you to enqueue tasks in the same way the command file based interface does described in here: [https://wiki.augmensys.com/index.php?title=UBIK_Enterprise_Service#XML_Command UBIK_Enterprise_Service#XML_Command]. Additionally it implements a new feature, namely the possibility to enqueue a task. A task is an abstract concept and describes something that needs to be done by UBIK. A task must have an entry point which must be a .Net implementation of a method. There are two ways for UBIK to identify a task to executed: Either you provide the full class name (Namespacename.Classname) and the methodname or you provide the full class name make the class implement the UBIK.ServiceTask.TaskExecution.ITask interface. You can also provide parameters to your task. These parameters must be a json serialized string. It is then the responsibility of the implementation of the task itself to deserialize the json string to an object. Finally you will need to tell the EnterpriseService on which database/UBIK project you want it to execute the task on. Overall the parameters to enqueue a task by the WebInterface must be as follows:<source lang="xml">bool SSPIstring SQLUserstring SQLPasswordstring SQLServerstring SQLInitialCatalog // Full path ({Methodname}) to the method (task) to be executed.string MethodName // Full path ({Namespacename}.{Classname}) to the method to be executed.string ClassFullname // As an example of how to write a method parameter as a json string:// string methodParametersAsJson = @"{// ""ParamA"": ""ValueA"",// ""ParamB"": ""ValueB""// }";string MethodParametersAsJson </source>
182
edits