Return a user defined string to the client from the application server connection procedure
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Return a user defined string to the client from the application server connection procedure
When you establish a connection to the application server with the Java Open Client, you instantiate an AppObject using one of the four constructors provided by ProxyGen. If the connection to the application server fails, the AppObject constructor throws a standard exception. This exception can also contain a user defined string, if you have set up your application server to do so.
The Connection object communicates with a
remote ABL procedure stored on the application server known as the connection procedure. If
that procedure contains the ABL RETURNstring statement, then that string will be contained in the connection failure
exception.
If the connection is successful, and the connection procedure
has an ABL RETURNstring statement,
you can access the string using the AppObject method _getProcReturnString().
If the connect procedure does not return a value, then the _getProcReturnString() method
returns null.
The following sample Java Open Client code illustrates this functionality:
|
If the connection is successful and the connect procedure returns a string, then the string value is displayed by the first message box. If the connect procedure failed and returns a string, then the string value is displayed by the second message box.