Configure a third-party Web application
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The REST API framework in OpenEdge is built on the standard JAVA servlet
framework. The code for the REST API framework is built into the
fathom.jar file and is available to third-party Web applications. The
servlet receives its configuration from an XML file which specifies the classes that are
to be scanned for annotations.Note: The servlet must be defined in the
Java Web application
web.xml file.An example of REST servlet definition and configuration in an XML file is
provided in Table 3:
|
The file format of the configuration XML file is simple. The file can define
any number of implementations. Each <fathomapi/>
node defines the fully qualified name of a class that extends the FathomAPIServletHandler class. To handle URL mapping and
request access to a context, the derived class must inherit from the FathomAPIServletHandler class.
The XML file specifies the classes that are to be scanned for annotations to
map them to URLs. Servlet mapping is defined in the web.xml file and all the URLs in the
classes are made available for mapping by the Java servlet beneath this servlet mapping.
In the above example, all the URLs mapped from the classes are made available beneath
/<webcontextpath/rest/.
An example of a complete
restconfig.xml file
is provided in Table 4:
|