Expose ABL code using the APSV transport
- Last Updated: February 11, 2026
- 4 minute read
- OpenEdge
- Version 13.0
- Documentation
The APSV transport enables you to expose server-side ABL business logic to ABL client applications and Java and .NET clients that use the OpenEdge Open Client framework.
To expose ABL business logic through the APSV transport, perform the following steps:
- Create a service interface for your business logic.
- Place service interface and business logic code in a PROPATH directory.
- Test the code using an ABL client.
Create a service interface
A service interface consists of one or more procedure files that provide a layer of abstraction on top of core ABL business logic.
In the following example, the ABL class contains some business logic
that needs to be exposed to a client application through the APSV
transport.
|
The business logic returns a customer's name based on customer ID. To
expose this functionality through the APSV transport, you need to create a procedure
that acts as a service interface. For example:
|
Client applications must then run this procedure remotely on a PAS for OpenEdge instance.
Place service interface and business logic code in a PROPATH directory
You must compile service interface and business logic code into r-code and place the r-code in a PROPATH directory to enable client applications to access the code. You can do this in one of the following ways:- If you are using Progress Developer Studio for OpenEdge, perform
the following steps:
- Set automatic compilation by selecting Project > Build Automatically.
Alternatively, select Project >
Clean.
- Right-click the AppServer
folder in the project, select Properties, and
then click the icon next to the pathname. This opens the folder in a
Windows Explorer.
- Open the AppServer folder and
locate the r-code (files with the extension .R ).
- Copy the r-code into a directory that is included in the ABL application's PROPATH.
- Set automatic compilation by selecting Project > Build Automatically.
Alternatively, select Project >
Clean.
- Run a procedure that compiles the ABL business logic and service
interface code into a PROPATH directory, as in this example:
COMPILE C:\Progress\workspace\MyApp\AppServer\Customer.cls SAVE INTO C:\OpenEdge\WRK\oepas1\openedge. COMPILE C:\Progress\workspace\MyApp\AppServer\service-interface.p SAVE INTO C:\OpenEdge\WRK\oepas1\openedge.
Test the code using an ABL client
After the compiled ABL code is placed in a PROPATH directory, create an ABL client that runs the service interface procedure remotely. To do this, you need to perform the following steps:- Define variables that map to the service interface's input and
output parameters.
DEFINE VARIABLE CustId AS INTEGER NO-UNDO. DEFINE VARIABLE CustName AS CHARACTER NO-UNDO. - Create a server object.
DEFINE VARIABLE hAppServer AS HANDLE NO-UNDO. CREATE SERVER hAppServer. - Use the server object to connect to the PAS for OpenEdge
instance. You need to specify two properties:
-URL—the URL must include the PAS for OpenEdge instance host and port, optionally followed by the name of a web application, followed by the transport name (apsv). If you specify a web application name, ensure that the web application is part of the ABL application whose PROPATH points to your compiled service interface and business logic code.-sessionModel—specifySession-freeorSession-managed, based on your needs.Session-freeenables unbound connections, where each client request is executed in a separate session.Session-managedenables bound connections, where each client request is executed in the same session, until theDISCONNECT()method is called by the client.
For a complete list of parameters that you can pass to theDEFINE VARIABLE apsvURL AS CHARACTER NO-UNDO. apsvURL = "-URL http://localhost:8810/apsv -sessionModel Session-free". hAppServer:CONNECT(apsvURL).CONNECT()method, see Connection parameters argument. - Run the service interface procedure.
CustId = 1. RUN service-interface.p ON hAppServer(INPUT CustId, OUTPUT CustName). MESSAGE CustName. - Disconnect from the server and delete the server
object.
hAppServer:DISCONNECT(). DELETE OBJECT hAppServer.
Here is the complete example:
|