Is there a guide on how to do http request GET/POST on external api(other app) and then display the JSON/data returned inside axelor using custom views?
I have look into Actions and WebService Action on axelor docs but it was only doing api request on axelor api’s not other app’s api.
Maybe you can use a Controller (java) that will call the external API and return the object. This controller can be called from a field using “expr=call:my.class:MyMethod()” of from an action-method to set a field value.
Hi,
But i mean when i write a custome services ex: stock_move functions and i want to public it as a json services for mobile client. How i can do that?
because i see the document it only support some single method: read, update, create, delete for a models.
thanks so much!
To create your custom service inside the Axelor app you just have to create your own module and to declare your self RestEasy class. These defined classes will be automatically scanned at start.
Just have a look at classes source here com.axelor.web.service (ADK) to see how to create a custom JSON Service.
You have the choice to return Axelor Response or JaxResponse as you need.