OpenEdge.Web.CatalogWebHandler
- Last Updated: November 12, 2026
- 5 minute read
- OpenEdge
- Version 13.1
- Documentation
|
Method Summary
| Options | Name | Purpose | |
|---|---|---|---|
| Discovery () |
/**
* Discover and register available REST services for the current ABL application context.
*
* DISCOVERY LOGIC:
* ----------------
* 1. Extract the current webapp name from the incoming HTTP request (e.g., 'ROOT', 'webapp1', etc.)
*
* 2. Look up which ABL application relates to this webapp by consulting the configuration
* parsed from openedge.properties (happens regardless of WEB transport enabled status)
*
* 3. Build a list of paths to search for service mapping files (.gen/.map):
* a) CATALINA_BASE/openedge - Common location (always searched)
* b) CATALINA_BASE/ablapps/{ablApp}/openedge - Current ABL app location
* c) CATALINA_BASE/webapps/{webapp}/WEB-INF/openedge - For EACH webapp belonging
* to the current ABL app that has WEB transport enabled (enabled: true in config)
*
* 4. Register all services found in these paths with the ServiceRegistry
*
* RATIONALE:
* ----------
* - The incoming webapp determines the ABL application context (which AVM/session)
* - All webapps in the same ABL app share the same ServiceRegistry (in-memory)
* - We search ALL enabled webapps for that ABL app because services from any of
* them may be available in this shared registry
* - Disabled webapps are skipped because without WEB transport, mapping files
* won't be used/processed, so there's no point searching those locations
*
* EXAMPLE:
* --------
* Request comes in on /webapp1
* - webapp1 belongs to ABL app "oepas1"
* - oepas1 has webapps: ROOT (WEB enabled), webapp1 (WEB enabled), webapp2 (WEB disabled)
*
* Will search:
* - CATALINA_BASE/openedge
* - CATALINA_BASE/ablapps/oepas1/openedge
* - CATALINA_BASE/webapps/ROOT/WEB-INF/openedge
* - CATALINA_BASE/webapps/webapp1/WEB-INF/openedge
* - (CATALINA_BASE/webapps/webapp2/WEB-INF/openedge is skipped - WEB disabled)
*/
|
||
| CHARACTER GetAblAppForWebApp (character) |
/**
* Find the ABL application name for a given webapp.
* Looks up the webapp in the oAppWebappConfig JSON structure.
* Returns the ABL app name that owns this webapp, or empty string if not found.
* Note: Returns the ABL app regardless of whether the webapp is enabled.
*/
|
||
| CHARACTER GetCurrentWebApp (IWebRequest) |
/**
* Get the current webapp name from the web request context.
* Extracts the webapp from the WebAppPath property.
* Returns the webapp name (e.g., 'ROOT', 'demo', 'api').
*/
|
||
| CHARACTER GetFullPathname (character) |
/**
* Get the full pathname of a file or directory.
* Normalizes path separators to forward slashes for cross-platform compatibility.
* Used internally to ensure consistent path handling across Windows and Unix systems.
*
* @param pcFile The file or directory path to normalize
* @return Normalized path with '/' separators and no trailing slash
*/
|
||
| Progress.Json.ObjectModel.JsonObject GetOpenApiCatalog () |
/**
* Generate an OpenAPI v3.1 formatted catalog of all available REST services.
* Retrieves services from the ServiceRegistry which was populated during Discovery.
* The catalog includes all API endpoints found in the .gen/.map files for this ABL application.
*
* Uses instance variables cScheme, cHostname, cDefaultContext, cDefaultBasePath
* populated by HandleGet to construct accurate server URLs.
*
* @return JsonObject containing the complete OpenAPI v3.1 specification
*/
|
||
| INTEGER HandleGet (IWebRequest) |
/* Default handler for the HTTP GET method
@param IWebRequest The request being serviced
@return integer An optional status code. A zero or null value means this
method will deal with all errors */
|
||
| INTEGER HandleNotAllowedMethod (IWebRequest) |
/**
* Handle HTTP methods that are not allowed for this endpoint.
* Only GET is supported; all other methods return 405 Method Not Allowed.
*
* @param poRequest The incoming web request
* @return 405 Method Not Allowed status code
*/
|
||
| INTEGER HandleNotImplemented (IWebRequest) |
/**
* Handle requests for HTTP methods that are recognized but not implemented.
*
* @param poRequest The incoming web request
* @return 501 Not Implemented status code
*/
|
||
| ScanCatalinaProperties () |
/**
* Scan catalina.properties for HTTP/HTTPS port configuration.
* Updates the iPort variable with the discovered port number.
*/
|
||
| ScanOpenEdgeProperties () |
/**
* Scan openedge.properties for ABL application and their related webapp relations.
* Builds a JSON structure mapping ABL apps to their webapps with WEB transport enabled.
* Ensures that only webapps with WEB transport enabled would use .gen/.map files.
* Format: { "ablAppName": { "webapps": { "webappName": true/false } } }
*
* Multi-App Example:
* {
* "externalApp": {
* "webapps": {
* "ROOT": false,
* "public": true
* }
* },
* "internalApp": {
* "webapps": {
* "private": true
* }
* }
* }
*/
|
||
| WriteResponse (IHttpResponse) |
/** Writes the response using the WebResponseWriter.
This method allows us to unit test this handler (via gradle/batch).
@param IHttpResponse The response to write */
|
Constructor Summary
| Options | Name | Purpose | |
|---|---|---|---|
| CatalogWebHandler () |
|
Property Summary
| Options | Name | Purpose | |
|---|---|---|---|
| CHARACTER CatalinaBase |
|
||
| CHARACTER ServiceMappingPaths |
|
Method Detail
Discovery ()
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CHARACTER GetAblAppForWebApp (character)
|
||||||||||||||||||
CHARACTER GetCurrentWebApp (IWebRequest)
|
||||||||||||||||||
CHARACTER GetFullPathname (character)
|
||||||||||||||||||
Progress.Json.ObjectModel.JsonObject GetOpenApiCatalog ()
|
||||||||||||||||||
INTEGER HandleGet (IWebRequest)
|
||||||||||||||||||
INTEGER HandleNotAllowedMethod (IWebRequest)
|
||||||||||||||||||
INTEGER HandleNotImplemented (IWebRequest)
|
||||||||||||||||||
ScanCatalinaProperties ()
|
||||||||||||||||||
ScanOpenEdgeProperties ()
|
||||||||||||||||||
WriteResponse (IHttpResponse)
|
||||||||||||||||||
Constructor Detail
CatalogWebHandler () |
||||
|---|---|---|---|---|
Property Detail
CHARACTER CatalinaBase
|
||||||||
|---|---|---|---|---|---|---|---|---|
CHARACTER ServiceMappingPaths
|
||||||||