Hi
I am using REST API add-on to execute a service method and have some questions on date date type.
I am sending DateTime parameter value from Flutter and in my REST API Backend, using java.util.Date parameters. However, when I read the exception below it looks like there are some extra characters received by the REST API as below.
astSecurityFilter - REST API request [***xcNE] GET http://43.224.118.54:8080/myAPP/rest/v2/services/erp_LeaveSystemService/createLeaveApplication?employeeCode=000171&leaveTypeCode=CL&startDate=2022-05-09%2000:00:00.000&endDate=2022-05-10%2000:00:00.000&durType=fullDay¬e=TEST 50.50.50.2
2022-04-10 12:28:46.688 DEBUG [http-nio-8080-exec-290/myAPP/000171] com.haulmont.addon.restapi.api.rest.RestAPIDispatcherServlet - GET "/inteaccERP/rest/v2/services/erp_LeaveSystemService/createLeaveApplication?employeeCode=000171&leaveTypeCode=CL&startDate=2022-05-09%2000:00:00.000&endDate=2022-05-10%2000:00:00.000&durType=fullDay¬e=TEST", parameters={masked}
2022-04-10 12:28:46.859 ERROR [http-nio-8080-exec-290/myAPP/000171] com.haulmont.addon.restapi.api.config.RestServicesConfiguration - Method not found. Service: erp_LeaveSystemService, method: createLeaveApplication, argument types: [class java.lang.String, class java.lang.String, class java.util.Formatter$DateTime, class java.util.Formatter$DateTime, class java.lang.String, class java.lang.String]
2022-04-10 12:28:46.859 INFO [http-nio-8080-exec-290/myAPP/000171] com.haulmont.addon.restapi.api.controllers.RestControllerExceptionHandler - RestAPIException: Service method not found, erp_LeaveSystemService.createLeaveApplication(employeeCode,leaveTypeCode,startDate,endDate,durType,note)
2022-04-10 12:28:46.953 DEBUG [http-nio-8080-exec-290] com.haulmont.addon.restapi.api.rest.RestAPIDispatcherServlet - Completed 404 NOT_FOUND
Here is the Server siide codes:
REST Service:
<method name="createLeaveApplication">
<param name="employeeCode" type="java.lang.String"/>
<param name="leaveType" type="java.lang.String"/>
<param name="startDate" type="java.util.Date"/>
<param name="endDate" type="java.util.Date"/>
<param name="durType" type="java.lang.String"/>
<param name="note" type="java.lang.String"/>
</method>
ServiceBean:
@Override
@Transactional
public void createLeaveApplication(String employeeCode, String leaveTypeCode, Date startDate, Date endDate, String durType, String note){
Thanks for any help suggesting a fix.