Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge REST Web Services : Data Object Services : Coding Business Entities to implement Data Objects : Using existing ABL code with the Define Service Interface wizard
 
Using existing ABL code with the Define Service Interface wizard
When you define a Data Object resource from an existing ABL class or procedure (using the Define Service Interface wizard), you select the existing class or procedure file, the data model for the new Data Object resource to support, and the existing ABL routines that you want to implement Data Object operations for the resource. In this case, you select an operation, and choose the ABL routine you want to implement it. Each ABL routine you have selected for the resource can implement only one operation, whether it is a standard Data Object CRUD or Submit operation or a custom Invoke operation. Once you have chosen a routine for every CRUD and Submit operation you need to implement, any remaining routines in the list can each implement an Invoke operation. (If you choose to have all the existing ABL routines implement Invoke operations, the Data Object resource then supports no CRUD or Submit operations.)
Note: A common use of this wizard is to add additional ABL methods as Invoke operations in a Business Entity that you have previously created using the New Business Entity wizard.
When the wizard completes, it annotates the file and the ABL routines chosen to implement Data Object operations similar to the annotations added to the class file and methods of a new Business Entity.
Note that the Define Service Interface wizard does not verify that the existing ABL routines you choose are coded properly to implement a given operation. For a Data Object CRUD or Submit operation, the wizard does not even verify that the prescribed parameter list for the operation is correct. If a Data Object CRUD or Submit operation has an incorrect parameter list, the operation will not work. So, you might have to revise any existing ABL routines that you chose to implement Data Object CRUD or Submit operations to perform the work of that operation, at least according to OpenEdge Data Object functional requirements (see Coding ABL for Data Object operations).