-1

I have to call in a PL/SQL procedure this web service rest.

I did this script to call this web service rest and download the table :

{

DECLARE
  l_param_list     VARCHAR2(512);

  l_http_request   UTL_HTTP.req;
  l_http_response  UTL_HTTP.resp;

  l_response_text  VARCHAR2(32767);
BEGIN


  -- service's input parameters
  l_param_list:=:xxx;
  --l_param_list := FND_PROFILE.VALUE('XXCC_LINK_BANCA_ITALIA_CAMBIO'); 


  DBMS_OUTPUT.put_line('link:'||l_param_list);

  -- preparing Request...
  l_http_request := UTL_HTTP.begin_request (l_param_list
                                          , 'POST'
                                          , 'HTTP/1.1');

  -- ...set header's attributes
  UTL_HTTP.set_header(l_http_request, 'Content-Type', 'application/x-www-form-urlencoded');
  UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_param_list));

  -- ...set input parameters
  UTL_HTTP.write_text(l_http_request,l_param_list);

  -- get Response and obtain received value
  l_http_response := UTL_HTTP.get_response(l_http_request);

  UTL_HTTP.read_text(l_http_response, l_response_text);

  DBMS_OUTPUT.put_line(l_response_text);

  -- finalizing
  UTL_HTTP.end_response(l_http_response);

EXCEPTION
  WHEN UTL_HTTP.end_of_body 
    THEN UTL_HTTP.end_response(l_http_response);  
END;}

How can I declare the parameters of this service as initDay, initMonth or refCur?

ɢʀᴜɴᴛ
  • 27,201
  • 15
  • 87
  • 93
filippo
  • 3
  • 2
  • 7

1 Answers1

0

POST parameters are passed in as part of the body (ie the write_text() call).. see How are parameters sent in an HTTP POST request? for the general procedure

ShoeLace
  • 3,070
  • 2
  • 26
  • 39