To expose a Business Component (henceforth the BC) as a Rest web service, you only need to do the following configuration at the BC properties:
- Expose as web service = TRUE
- Web Service Protocol = REST Protocol
After generating the BC, it's exposed as a Rest service and it can be consumed using the HTTP protocol (in particular, the HttpClient data type) in GeneXus.
Note that the specification document of this service can be generated automatically. See Documenting RestFul services.
The endpoint URI for Business components is
<server uri>/rest/<bc name>
E.g: If "Product" is a BC exposed as Rest, the URI of the service would be: 172.19.12.1/MyApp/rest/Product
If the BC belongs to a module, the endpoint URI is
<server uri>/rest/<module>/<bc name>
To consume a Business Component exposed as Rest, see Consuming a Business Component exposed as Rest with GeneXus.