33.38 PROCESS_DML_RESPONSEプロシージャ
このプロシージャは、DMLリクエスト・レスポンスを解析し、戻り値を値コンテキスト・オブジェクトにロードします。
構文
APEX_PLUGIN_UTIL.PROCESS_DML_RESPONSE (
p_web_source_operation IN wwv_flow_plugin_api.t_web_source_operation,
p_web_source IN wwv_flow_plugin_api.t_web_source,
--
p_response IN CLOB,
p_status_code IN pls_integer,
p_error_message IN VARCHAR2,
--
p_values_context IN wwv_flow_exec_api.t_context );
パラメータ
表33-54 PROCESS_DML_RESPONSEのパラメータ
パラメータ | 説明 |
---|---|
p_web_source_operation |
RESTデータ・ソース操作(プラグイン)のメタデータ |
p_web_source |
RESTデータ・ソース(プラグイン)のメタデータ |
p_response |
解析するRESTレスポンス |
p_status_code |
使用するHTTPステータス・コード |
p_error_message |
使用するエラー・メッセージ |
p_values_context |
戻り値を格納する値コンテキスト |
例
次の例では、プラグインDMLプロシージャ内でPROCESS_DML_RESPONSEを使用します。
apex_plugin_util.process_dml_response (
p_plugin in apex_plugin.t_plugin,
p_web_source in apex_plugin.t_web_source,
p_params in apex_plugin.t_web_source_dml_params,
p_result in out nocopy apex_plugin.t_web_source_dml_result )
IS
l_web_source_operation apex_plugin.t_web_source_operation;
l_request_body clob;
l_response clob;
l_return_values_ctx apex_exec.t_context := p_params.insert_values_context;
BEGIN
l_web_source_operation := apex_plugin_util.get_web_source_operation(
p_web_source => p_web_source,
p_db_operation => apex_plugin.c_db_operation_insert,
p_perform_init => true );
apex_plugin_util.build_request_body(
p_request_format => apex_plugin.c_format_json,
p_profile_columns => p_web_source.profile_columns,
p_values_context => p_params.insert_values_context,
p_build_when_empty => true,
p_request_body => l_request_body );
-- continue with APEX_PLUGIN_UTIL.MAKE_REST_REQUEST
wwv_flow_plugin_util.process_dml_response(
p_web_source_operation => l_web_source_operation,
p_web_source => p_web_source,
--
p_response => l_response,
--
p_status_code => wwv_flow_webservices_api.g_status_code,
p_error_message => wwv_flow_webservices_api.g_reason_phrase,
--
p_values_context => l_return_values_ctx );
END plugin_dml;
親トピック: APEX_PLUGIN_UTIL