How to turn on web services

  • To turn on any web service, we need to create insert queries to the table “AE_S_SYS_PARAMETER”Back
  • Go to the AiM system->Key & Access Control->Access Point and get the table name for which the
    web services need to be turned on.

table_name

  • After finding the necessary table, go to the data dictionary and open the index.html file. Find the facade using the table name to know the facade to which the web service belongs to.
  • Here, in my case the table name is ae_kac_access_point, and the facade is KeyFacade

datadictionary

  • Javadocs contains the list of all the methods and classes available in AiM. Use the javadocs->index.html file and go to KeyFacade. Use the table name to find the functions corresponding to each of the web service.

keyfacade

  • We need to write 4 insert queries, one for each, template, find by key, find by document and save
  • Template query

INSERT INTO AE_S_SYS_PARAMETER (PARAMETER_NAME, DESCRIPTION, PARAMETER_VALUE, PARAMETER_TYPE, EDIT_DATE, EDIT_CLERK, MULTITENANT_ID) VALUES (‘KEY:1000’, ‘Template Access Point’,’KEY:templateAeKacAccessPoint()’,’WEB_SERVICE’,sysdate,null,0);

 

  • Parameter name should be a unique key starting with “KEY:”, parameter value is the function name we are going to find from the javadocs for each web service. Description is just describing the web service, parameter type should be “WEB_SERVICE”, edit_date and edit_clerk are not mandatory but it should not be given as ‘ ‘, empty string. You can use null instead. Use ‘0’ for multitenant_id  to make the webservice available globally

templatefun()

  • findbykey

INSERT INTO AE_S_SYS_PARAMETER (PARAMETER_NAME, DESCRIPTION, PARAMETER_VALUE, PARAMETER_TYPE, EDIT_DATE, EDIT_CLERK, MULTITENANT_ID) VALUES (‘KEY:1010’, ‘Access Point Find By Key’,’KEY:findByPrimaryKey(com.maximus.fmax.key.dto.AeKacAccessPointPK,boolean)’,’WEB_SERVICE’,sysdate,null,0);

findbyprimarykey()

  • Click on the argument of the function to get the entire package name

Note:The argument of the function name also needs to be included with the whole package of the class

class_name

  • findbydocument

INSERT INTO AE_S_SYS_PARAMETER (PARAMETER_NAME, DESCRIPTION, PARAMETER_VALUE, PARAMETER_TYPE, EDIT_DATE, EDIT_CLERK, MULTITENANT_ID) VALUES (‘KEY:1020’, ‘Access Point Find By Document’,’KEY:findByDTO(com.maximus.fmax.key.dto.AeKacAccessPointDTO,java.util.List)’,’WEB_SERVICE’,sysdate,null,0);

findbydto()

findbydtoclass

  • save (does both insert and update)

INSERT INTO AE_S_SYS_PARAMETER (PARAMETER_NAME, DESCRIPTION, PARAMETER_VALUE, PARAMETER_TYPE, EDIT_DATE, EDIT_CLERK, MULTITENANT_ID) VALUES (‘KEY:1030’, ‘Access Point Save’,’KEY:save(com.maximus.fmax.key.dto.AeKacAccessPointDTO, boolean)’,’WEB_SERVICE’,sysdate,null,0);

save() saveclass

  • Now, these are the queries we need to turn ON a web service

Go back to Basic Web Services – Training