44.1 About Configuring Flexible Remote Servers in APEX
Flexible remote servers use a configuration procedure to change the URL endpoint of the server.
The procedure is defined by the end user either as a package procedure in the database or as the attribute PL/SQL Code
of the Remote Server.
The name of this procedure is specified by the end user while editing the remote server. This procedure needs to have a specific signature using t_remote_server_info
and t_remote_server_config
.
A resulting procedure resembles the following code example:
procedure my_server_config(
p_info in apex_plugin.t_remote_server_info,
p_config out apex_plugin.t_remote_server_config )
is
begin
if p_info.application_id = 100
then
p_config.base_url := 'https://#cust#.example.com';
p_config.substitutions := apex_t_varchar2();
apex_string.plist_put( p_config.substitutions, 'cust', v('P3_CUSTOMER') );
else
p_config.base_url := 'https://test.example.com';
end if;
end;
Parent topic: APEX_PLUGIN