44.1 APEXでのフレキシブル・リモート・サーバーの構成について

フレキシブル・リモート・サーバーでは、そのサーバーのURLエンドポイントの変更に構成プロシージャが使用されます。

このプロシージャは、エンド・ユーザーが、データベース内のパッケージ・プロシージャとして、またはリモート・サーバーの属性「PL/SQLコード」として定義します。

このプロシージャの名前は、リモート・サーバーの編集中にエンド・ユーザーが指定します。このプロシージャには、t_remote_server_infoおよびt_remote_server_configを使用した特定のシグネチャが必要です。

結果のプロシージャは、次のコード例のようになります:

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;