Tried to wire REST with the service layer, It is working fine. Able to successfully insert into database