Try OpenEdge Now
skip to main content
New Information
OpenEdge Data Object Handler : Create an ABL service
 

Create an ABL service

Before you create an ABL service, set up a PAS for OpenEdge instance that you can deploy the service to. You also need to create an ABL Web App project in Progress Developer Studio.
PAS for OpenEdge provides two transports to work with HTTP requests--REST and WEB. An ABL service is a transport-dependent grouping of resources. For example, imagine that you have two ABL classes —Order and Customer. You can set up an ABL service to provide access to these classes via a specific transport (REST or WEB, but not both).
The REST transport accepts HTTP requests via a /rest URI segment (http://localhost/myWebApp/rest). The WEB transport does so via a /web URI segment (http://localhost/myWebApp/web).
A DOH-based ABL service uses the WEB transport. Once the service is up and running, client applications access the service by appending the service name to the WEB transport URI (for example, http://localhost/myApp/web/HelloService).
Typically though, client applications access a service endpoint, which returns some data. In the URI, the service endpoint follows the service name (http://localhost/myApp/web/HelloService/CustomerMessage).
The DOH enables you to define custom service endpoints and map HTTP verbs to operation handlers for each endpoint. For instance, for an endpoint like /CustomerMessage, you may want to map its GET verb with an entity operation handler, and configure the entity handler to use a getPersonalizedMessage() method from a CustomerMessage.cls class. Similarly, you may want to map its PUT verb with an updateCustomerMessage() method, its POST verb with an newCustomerMessage() method, and so on.
The first step is to create an ABL service that uses the DOH. Perform this task as follows:
1. Right-click the root project name in the Project Explorer view in Progress Developer Studio and select New > ABL Service.
2. Select WEB in the Transport dropdown.
3. Enter a name for the service, (such as HelloService).
4. In the Web Handler section, choose Select existing and then browse and select OpenEdge.Web.DataObject.DataObjectHandler.
5. Add a single resource URI that matches the service name (/HelloService).
6. Click Finish.