Skip to content

Call_Rest_EndPoint

This will initiate the REST call with message payload and other required parameters. This is an overloaded procedure where the message payload can be a record structure or a document or a XML. Request will be synchronous or asynchronous based on the value of sync_ parameter.

PROCEDURE Call_Rest_EndPoint (
   rest_service_        IN              VARCHAR2,
   message_payload_     IN OUT  NOCOPY  type_record_,
   url_params_          IN              type_record_ DEFAULT NULL,
   callback_func_       IN              VARCHAR2,
   http_method_         IN              VARCHAR2,
   http_req_headers_    IN              VARCHAR2 DEFAULT NULL,
   query_parameters_    IN              type_record_ DEFAULT NULL,
   header_params_       IN              type_record_ DEFAULT NULL,
   incld_resp_info_     IN              BOOLEAN DEFAULT NULL,
   fnd_user_            IN              VARCHAR2 DEFAULT NULL,
   key_ref_             IN              VARCHAR2 DEFAULT NULL,
   sender_              IN              VARCHAR2 DEFAULT NULL,   
   message_type_        IN              VARCHAR2 DEFAULT 'EVENT',
   receiver_            IN              VARCHAR2 DEFAULT default_recevier_,
   subject_             IN              VARCHAR2 DEFAULT NULL,
   in_order_            IN              BOOLEAN DEFAULT FALSE,
   fail_notify_         IN              BOOLEAN  DEFAULT FALSE,
   failed_callback_fun_ IN              VARCHAR2 DEFAULT NULL,
   accepted_res_codes_  IN              VARCHAR2  DEFAULT NULL,
   auth_params_         IN              type_record_ DEFAULT NULL,
   sync_                IN              BOOLEAN  DEFAULT FALSE);  
     
  PROCEDURE Call_Rest_EndPoint (
   rest_service_        IN      VARCHAR2,
   message_payload_     IN OUT  Document,
   url_params_          IN      Document DEFAULT NULL,
   callback_func_       IN      VARCHAR2 DEFAULT NULL,
   http_method_         IN      VARCHAR2,
   http_req_headers_    IN      VARCHAR2 DEFAULT NULL,
   query_parameters_    IN      Document DEFAULT NULL,
   header_params_       IN      Document DEFAULT NULL,
   incld_resp_info_     IN      BOOLEAN  DEFAULT NULL,
   fnd_user_            IN      VARCHAR2 DEFAULT NULL,
   key_ref_             IN      VARCHAR2 DEFAULT NULL,
   sender_              IN      VARCHAR2 DEFAULT NULL,   
   message_type_        IN      VARCHAR2 DEFAULT 'EVENT',
   receiver_            IN      VARCHAR2 DEFAULT default_recevier_,
   subject_             IN      VARCHAR2 DEFAULT NULL,
   in_order_            IN      BOOLEAN DEFAULT FALSE,
   fail_notify_         IN      BOOLEAN DEFAULT FALSE,
   failed_callback_fun_ IN      VARCHAR2 DEFAULT NULL,
   accepted_res_codes_  IN      VARCHAR2 DEFAULT NULL,
   auth_params_         IN      Document DEFAULT NULL,
   sync_                IN      BOOLEAN  DEFAULT FALSE);  

  PROCEDURE Call_Rest_EndPoint (
   rest_service_        IN      VARCHAR2,
   xml_                 IN OUT  CLOB,
   url_params_          IN      type_record_ DEFAULT NULL,
   callback_func_       IN      VARCHAR2,
   http_method_         IN      VARCHAR2,
   http_req_headers_    IN      VARCHAR2 DEFAULT NULL,
   query_parameters_    IN      type_record_ DEFAULT NULL,
   header_params_       IN      type_record_ DEFAULT NULL,
   incld_resp_info_     IN      BOOLEAN DEFAULT NULL,
   fnd_uder_            IN      VARCHAR2 DEFAULT NULL,
   key_ref_             IN      VARCHAR2 DEFAULT NULL,
   sender_              IN      VARCHAR2 DEFAULT NULL,
   receiver_            IN      VARCHAR2 DEFAULT default_recevier_,
   message_type_        IN      VARCHAR2 DEFAULT 'EVENT',   
   subject_             IN      VARCHAR2 DEFAULT NULL,
   in_order_            IN      BOOLEAN DEFAULT FALSE,
   fail_notify_         IN      BOOLEAN  DEFAULT FALSE,
   failed_callback_fun_ IN      VARCHAR2 DEFAULT NULL,
   accepted_res_codes_  IN      VARCHAR2 DEFAULT NULL,
   auth_params_         IN      type_record_ DEFAULT NULL);

 PROCEDURE Call_Rest_EndPoint (
   rest_service_        IN              VARCHAR2,
   message_payload_     IN              type_record_,
   url_params_          IN              type_record_ DEFAULT NULL,
   callback_func_       IN              VARCHAR2 DEFAUL NULL,
   http_method_         IN              VARCHAR2,
   http_req_headers_    IN              VARCHAR2 DEFAULT NULL,
   query_parameters_    IN              type_record_ DEFAULT NULL,
   header_params_       IN              type_record_ DEFAULT NULL,
   incld_resp_info_     IN              BOOLEAN DEFAULT NULL,
   fnd_user_            IN              VARCHAR2 DEFAULT NULL,
   key_ref_             IN              VARCHAR2 DEFAULT NULL,
   sender_              IN              VARCHAR2 DEFAULT NULL,   
   message_type_        IN              VARCHAR2 DEFAULT 'EVENT',
   receiver_            IN              VARCHAR2 DEFAULT default_recevier_,
   subject_             IN              VARCHAR2 DEFAULT NULL,
   in_order_            IN              BOOLEAN DEFAULT FALSE,
   fail_notify_         IN              BOOLEAN  DEFAULT FALSE,
   failed_callback_fun_ IN              VARCHAR2 DEFAULT NULL,
   accepted_res_codes_  IN              VARCHAR2  DEFAULT NULL,
   auth_params_         IN              type_record_ DEFAULT NULL,
   binary_response_     OUT             BLOB);  

 PROCEDURE Call_Rest_EndPoint (
   rest_service_        IN      VARCHAR2,
   message_payload_     IN      Document,
   url_params_          IN      Document DEFAULT NULL,
   callback_func_       IN      VARCHAR2 DEFAULT NULL,
   http_method_         IN      VARCHAR2,
   http_req_headers_    IN      VARCHAR2 DEFAULT NULL,
   query_parameters_    IN      Document DEFAULT NULL,
   header_params_       IN      Document DEFAULT NULL,
   incld_resp_info_     IN      BOOLEAN  DEFAULT NULL,
   fnd_user_            IN      VARCHAR2 DEFAULT NULL,
   key_ref_             IN      VARCHAR2 DEFAULT NULL,
   sender_              IN      VARCHAR2 DEFAULT NULL,   
   message_type_        IN      VARCHAR2 DEFAULT 'EVENT',
   receiver_            IN      VARCHAR2 DEFAULT default_recevier_,
   subject_             IN      VARCHAR2 DEFAULT NULL,
   in_order_            IN      BOOLEAN DEFAULT FALSE,
   fail_notify_         IN      BOOLEAN DEFAULT FALSE,
   failed_callback_fun_ IN      VARCHAR2 DEFAULT NULL,
   accepted_res_codes_  IN      VARCHAR2 DEFAULT NULL,
   auth_params_         IN      Document DEFAULT NULL,
   binary_response_     OUT     BLOB);  

Parameters

rest_service_The name of Rest Service.

message_payload_The message payload record/document.

xml_     The message payload as an XML file.

url_params_     URL parameters record/document.

callback_func_     Name of the Callback PL/SQL method.

http_method_     HTTP request method type.

http_req_headers_     Additional HTTP request headers.

query_parameters_     Optional. Query parameters of the URL.    
header_params_     Optional. Header parameters .    
include_resp_info_     Optional. Include the response code and response headers in the response.    
fnd_user_    Optional.  Can be used to pass the fnd_user who initiated the prediction call to the callback function

key_ref_    Optional. Can be used to pass the key_ref_ of the business object to the callback function.

sender_     Optional. Identity of sending organization. The value will be entered in FNDCN_APPLICATION_MESSAGE_TAB.SENDER.   
message_type_     Optional. The value will be entered in FNDCN_APPLICATION_MESSAGE_TAB.MESSAGE_TYPE.

receiver_     Optional. Identity of receiving organization. The value will be entered in FNDCN_APPLICATION_MESSAGE_TAB.RECEIVER.

subject_     Optional subject. The value will be entered in FNDCN_APPLICATION_MESSAGE_TAB.SUBJECT.

in_order_     Flag denoting if the message should be put to an InOrder queue. Default FALSE. If TRUE and it is not possible to find a queue or the found queue is not InOrder, an exception will be raised.   
fail_notify_     Flag denoting if a notification should be sent when the request is failed. Default FALSE.   
failed_callback_fun_    Optional. Name of the Callback PL/SQL method that needs to call for a failed request.   
accepted_res_codes_     Optional. Rest sender can return a response based on the standard http response codes raised by each http operations. Accepted response codes in Rest Sender are 200. 202, 204, 500, 401, 301, 302, 303 and 400. If the http response code does not belong to above accepted set, Rest Sender will throw an error. Hence, if a particular response code which does not belong to above accepted response codes, needs to accept by Rest Sender, those response codes can be set as the value for this parameter. When setting more than one accepted codes, should use comma as the delimiter.   
auth_params_    Optional. Authorization Parameters

sync_     Optional. By default Rest Sender supports asynchronous message flow. This flag should be set to make it synchronous.

binary_response_ Response of the Rest Service as a BLOB