Call the generic page APEX request

I'm running 5 APEX. My APEX page, I try to call a stored procedure of DB which makes a call to another page (see sources below). When I try to run the procedure, I get

ORA-29273: HTTP request failed ORA-24247: access denied by access control (ACL) of network list


I tried to run the grant_acl script in the BD, but still not the same error. What Miss me?


DECLARE

ACL_PATH VARCHAR2 (4000);

BEGIN

-Did the ACL currently assigned to ' *' and give APEX_050000

-the 'connect' privilege if APEX_050000

-has not yet the privilege.

SELECT ACLS IN ACL_PATH OF DBA_NETWORK_ACLS

WHERE HOST = ' *' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

IF DBMS_NETWORK_ACL_ADMIN. CHECK_PRIVILEGE (ACL_PATH, 'APEX_050000',

'connect') IS ZERO THEN

DBMS_NETWORK_ACL_ADMIN. ADD_PRIVILEGE (ACL_PATH,

"APEX_050000", TRUE, "connect");

END IF;

EXCEPTION

-When no ACL has been attributed to ' *'.

WHEN NO_DATA_FOUND THEN

DBMS_NETWORK_ACL_ADMIN. CREATE_ACL ('power_users.xml',

"ACL that allows users to be able to connect everywhere."

"APEX_050000", TRUE, "connect");

DBMS_NETWORK_ACL_ADMIN. ASSIGN_ACL('power_users.) XML ',' *');

END;

/

COMMIT;

create or replace procedure 'SET_CURRENT_SELECTION' IS

l_clob CLOB.

Req UTL_HTTP. REQ;

resp UTL_HTTP. RESP;

VARCHAR2 value (1024);

BEGIN

req: = UTL_HTTP. BEGIN_REQUEST ('http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan - components-tools - customfields:tallac & metric = test & format = csv' ');

Utl_http.set_header (req, "User-Agent", "Mozilla/4.0" "");

resp: = UTL_HTTP. GET_RESPONSE (req);

LOOP

UTL_HTTP. READ_LINE (RESP, value, TRUE);

DBMS_OUTPUT. Put_line (value);

END LOOP;

UTL_HTTP. END_RESPONSE (resp);

EXCEPTION

WHEN UTL_HTTP.end_of_body THEN

Utl_http.end_response (resp);

END;

Hi bobmagan,

bobmagan wrote:

I'm running 5 APEX. My APEX page, I try to call a stored procedure of DB which makes a call to another page (see sources below).

create or replace procedure 'SET_CURRENT_SELECTION' IS

l_clob CLOB.

Req UTL_HTTP. REQ;

resp UTL_HTTP. RESP;

VARCHAR2 value (1024);

BEGIN

Req: = UTL_HTTP. BEGIN_REQUEST ("http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan - components-tools - customfields:tallac & metric = test & format = csv' ');

Utl_http.set_header (req, "User-Agent", "Mozilla/4.0" "");

resp: = UTL_HTTP. GET_RESPONSE (req);

LOOP

UTL_HTTP. READ_LINE (RESP, value, TRUE);

DBMS_OUTPUT. Put_line (value);

END LOOP;

UTL_HTTP. END_RESPONSE (resp);

EXCEPTION

WHEN UTL_HTTP.end_of_body THEN

Utl_http.end_response (resp);

END;

Instead of UTL_HTTP, why not use APEX_WEB_SERVICE?

As the Web Service, you call a RESTful Web Service, you can use APEX_WEB_SERVICE. MAKE_REST_REQUEST function as follows:

create or replace procedure set_current_selection
is
  l_clob clob;
  l_buffer         varchar2(32767);
  l_amount         number;
  l_offset         number;
  l_url            varchar(4000) := 'http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan-components-tools-customfields:tallac&metrics=tests&format=csv';
begin

  l_clob := apex_web_service.make_rest_request (
              p_url => l_url,
              p_http_method => 'GET' );

    l_amount := 32000;
    l_offset := 1;
    begin
        loop
            dbms_lob.read( l_clob, l_amount, l_offset, l_buffer );
            dbms_output.put_line(l_buffer);
            l_offset := l_offset + l_amount;
            l_amount := 32000;
        end loop;
    exception
        when no_data_found then
            null;
    end;

end;

Kind regards

Kiran

Tags: Database

Similar Questions

  • Apex question 5.0 when you call the modal page

    Hello world

    I started work with apex 5.0 and I had a problem when I call a modal page; I have an interactive relationship with this query:

    WITH expert LIKE)

    Select user_id usr, LISTAGG(expert_designation,':') WITHIN GROUP (ORDER BY user_id) wording

    of t_utilisateur, t_expertise, table (xmlsequence (xmltype ('< a > < b >' | replace (user_expert_id, ':', '< /b > < b >') |.extract('/*/*') "< /b > < / a >"))) x

    where extractvalue (value (x), ' / b') = expert_id

    Group of user_id

    )

    Select USER_ID,

    USER_PASSWORD,

    USER_TUSER_ID,

    USER_NOM,

    USER_PRENOM,

    USER_DATE_NAISS,

    USER_DATE_RECRUT,

    USER_DATE_DEPART,

    USER_FONCT_ID,

    Libelle,

    USER_MGR_ID,

    USER_DEPT_ID,

    sys. DBMS_LOB. GetLength (USER_CV_FILE) CV,

    sys. DBMS_LOB. GetLength (USER_CV_CNFCPP_FILE) as CV_CNFCPP,

    ' < a class = "T-t-button - hot" href = "javascript:ajoutCertification('||)". USER_ID |') ; ' > Add < /a > '

    T_UTILISATEUR, expert of t

    where T_UTILISATEUR.user_id = t.usr;


    ajoutCertification() is a javascript function that calls the modal page and pass as a parameter the user id, the body of this function is:


    function ajoutCertification (user_id) {}

    document. Location.href ='f? p = & APP_ID.:19: & SESSION. : & DEBUG. : 19:P19_USCER_USER_ID: "+ user_id +":'

    }

    When I click on the button in the interactive report to call the modal page, I got this error message:

    102 page 19 application dialog box cannot be made successfully. Make sure that the page model used on page 19 is of type template

    'Page of dialogue', with appropriate initialization dialog JavaScript, the dialog box is closed and the dialog cancels code defined.

    any ideas on this problem and I thank you for your answers

    Hello

    See the Notes button which I created declaratively and it works very well.

    I would like to know if you have any questions now

    -Sunil Bhatia

  • How to call the asp page ofa page

    Hi all

    I have a requirement as I have to call the asp page ofa page

    using uri of destination I call the asp page, I need to pass the 10 parameters to this ASP page.

    here using session variables I'm passing these 10 settings of asp page but in the asp page will not receive values

    other than session variables

    how its posible.

    Thank you
    Anthony

    Srikanth,
    In fact I am j2ee world have no idea of the MS world :)! in any case, I just google the session object in ASP, I arrived knew this session in ASP and jsp object are managed in different ways, the two make their own session cookies, so if you move a page jsp in an ASP, the asp session object will have its own cookie and it won't read values of jsp.
    OK, the workaround for this road is the string query or URL parameters, you can pass your OAF page parameters in url such as
    'http://xxxxxxxxxxxxxxxxx.asp?PARAM1=VALUE1' and retrieve these values in the ASP page.
    Mukul-

    Published by: Mukul Gupta on January 12, 2010 14:09

  • conditionally display name of the field page apex LABEL in the email of the Apex.

    Hello
    I'm using Apex email process.

    I have a page where I have check conditions. ONLY WHEN the checkbox is enabled in the 'yes', I need to display this field in emails.
    Please notify

    field 1-birthday card order YES NO
    field 2-marriage card order YES NO



    If 1 is checked YES and 2 - is checked that NO, I need to insert only

    The NAME of the field LABEL 1. like...

    * 1 - birthday card order *. How? Please notify.

    Thank you
    KP

    Published by: user8612301 on March 7, 2013 13:47

    You can query the integrated views apex

    select LABEL from apex_application_page_items
    where application_id =110
    and page_id = 18
    //OR
    where ITEM_NAME = 'PX_ITEM_NAME'
    
  • How to keep the State page apex value after connection page

    Does anyone know to keep the State in a page of the apex, when I go to another page and come back? He keeps all the values entered into the fields, it seems that the gaps?

    I have 5 regions and each region have elements: text fields, selectors of dates, popup lov, field numbers, text box and view point only. When I go to the next page with redirect and return I see popup lovs values and values of one or two display items only. The values of the other text fields, dates selectors and the display just empty.

    Thank you everyone can help. Thank you.

    Kind regards
    Dragan

    Hello

    This element only display recording session state?
    Checks the attributes of the element.

    Kind regards
    Jari

    -----
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How to call the html page in JSF pages?   10.1.3 Jdev

    Hello.. Is it possible to call an HTML page in a JSF Page like PHP does with included "page.htm"?

    Thanks again

    Try the tag. See http://java.sun.com/products/jsp/tags/syntaxref.fm11.html.

    CM.

  • BB10 Webworks app cannot call the index page

    Hi all

    I work on the BB 10 Webworks and test on the ripple is fine, but if it was launched the bb10 Simulator on VM Fusion, the application cannot display the index page.

    SDK: BlackBerry 10 WebWorks SDK 1.0.4.11

    Ripple: 0.9.14

    VM Fusion: 5.02

    Simulator: BB10_1_X-807

    can someone help me, thank you very.

    I think I have this problem.

    I try to remove the old sdk bb10 of macos and then reinstall the latest JDK and JRE & bb10 sdk once again, problem solved.

  • passing values from one page to bring up the window page apex

    Hi all

    I created the java script to open a new window to send mail from apex.

    < script language = "JavaScript" type = "text/javascript" >

    function send_mails (template_id) {}
    Window.Open ('https://hrssc-in.oraclecorp.com/pls/apex/f?p=154:15: & SESSION.: 15:P15_VENDOR_CODE, P15_MONTH, P15_YEAR, P15_DISCREPANCY_DETAILS_DL, P15_DISCREPANCY_DETAILS_CS, P15_DISCREPANCY_DETAILS_PF, P15_DISCREPANCY_DETAILS_ESI, P15_TEMPLATE_ID: & P2_VENDOR_NAME., P2_MONTH., P2_YEAR., & P2_DISCREPANCY_DETAILS_DL, & P2_DISCREPANCY_DETAILS_CS. & P2_DISCREPANCY_DETAILS_PF. & P2_DISCREPANCY_DETAILS_ESI.) (,'+ category, null, "height = 500, width = 1200, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes") ;}


    < /script >

    I can change the value of page 2 to the page 15 using the code above that if I choose page submitt for items (action when the changed value of the page).

    If there is another way to transmit values without submitting the items (in the action of the page tab).

    can someone help me solve this problem

    Thanks in advance,

    Year s

    Hello

    the function of $ v that allows you to get the values of the elements cannot be used as part of the parameter to window.open.
    Try to concatenate function calls v$ in the parameter

    
    

    What does the category in the parameter string?

    Kind regards
    Erik-jan

  • Call the process page when clicking on a link to report

    Hi all
    I want to call a process of conditional page when clicking on a link to report;
    That is to say the process runs only if the user clicks on the report link.
    How can I do this?

    Thanks for your help.

    Concerning
    Ozzie

    Hello

    Yes, if you use the column change attributes report, in the section "links" column you can assign values to some articles.

    But if you only need to apply, you should probably use URLS like target and a javascript:doSubmit('REQUEST');.

    Kind regards
    Andrea

  • JavaScript input parameter should take the value of the element page Apex

    I have a JavaScript function which i dwonloaded ffrom net to generate bar codes

    DrawCode39Barcode(data,checkDigit).

    I call this function in the body of page attribute by using the following script

    < div id = "P5_X" > < / div >

    < script type = "text/javascript" >

    / * < ! [CDATA [* /]]

    function get_object (id) {}

    var object = null;

    If (document.layers) {}

    object = document.layers [id];

    } Else if (document.all) {}

    object = document.all [id];

    } else if (document.getElementById) {}

    object = document.getElementById (id);

    }

    Returns the object;

    }

    get_object('P5_X').innerHTML = DrawCode39Barcode('1-1-1111',0);

    < /script >

    When I run the page, the barcode for the value 1-1-1111' is generated. Please help so that when this page is running it will automatically take the value of the page item P5_X as parameter instead of hard coded value ' 1 - 1-1111'

    I think it would be simpler. You use the same id for the region and the order of the day, they must be different id

    JavaScript code can be in a dynamic action who sets fire to the loading of the page, or load Execute on the page of your page properties section.

    $('#barcode').html (DrawCode39Barcode ($v ('P5_X'), 0));

  • 2 call the calendar pages

    Hi all

    I need to know if you can call two pages of various details of a calendar page.

    Example:

    • In Page1, I manage the Table1; On page 2, I managed the Table2.
    • To build the page 3 with the calendar I use this SQL statement:

    Select 'T1', PK1, Date1 Description1

    from Table1

    Union

    Select 'T2', PK2, Date2 Description2

    from Table2

    order by 2


    If I click on a line of the calendar with Description1 I want to go to page 1 and if I click on a line of the calendar with Description2 I want to go to page 2.

    Is it possible?

    Thank you very much.

    What I mean is that you add a column over to the SQL with the name of the destination element.  So, we'll be on p10 on the p20

    select '20' as ID_PAGE, A.PK_ID_APPEL as PK, A.TXT_SUJET as TXT, A.DAT_APPEL as DAT
            , 'P20_ID' item
    
      from TBL_APPELS A
    union
    select '10', T.PK_ID_TACHE, T.TXT_TACHE, T.DAT_DEBUT_TACHE
          , 'P10_ID' item
      from TBL_TACHES T
    order by 4
    

    Then on the "game of these elements' reference you the COLUMN (#ITEM #) of SQL and not the name of the element.

    Make sense?

    Thank you

    -Jorge

  • Cannot display the home page /apex or /apex_admin after the installation of the local computer

    Hello

    I am trying to install and run a local version of Apex 4.2.2 on my Windows 7 laptop.  I followed the instructions in the Setup Guide of Apex.  And followed the troubleshooting steps and previous patterns uninstalled previous facilities.  Set up and ran the @apexins SYSAUX SYSAUX TEMP/i /.  And configured for the embedded PL/SQL Gateway Protocol. When you enter the url of the apex apex / http://127.0.0.0:8080 / apex_admin browser (configured to run java script) runs for 30 seconds then go back to the page "connection has expired.  The server to 127.0.0.0 takes too long to respond. "Is there something else I need to check/try (log files?).  At one point I had installed 3.2.2 Apex and to the top and runnign on the same laptop, but were not able to get the apex operational 4.x.  Thanks for any help.  -Mike

    Thank you, that did the trick!

  • Branch to the same page with different session variables

    Hello guys,.

    Is there a way that allows to create a branch that redirect to the same page with a different set of values for session variables. Or is it an effective way to add the buttons after that moves through the consecutive records in the pre and oracle apex.

    hope someone can help me.

    Kind regards.

    -shashikahk-

    is there a way to add the following buttons and pre

    If you create a form using the wizard pages, Apex will automatically create these buttons in some cases (as in a master form / retail).

    Create a master page / detail demo so you can see how it works. Apex creates a pre-rendering process:

    Get the value of the primary key next or previous

    Some of the hidden objects, such as Pxx_ROWID_NEXT.

    And two buttons: GET_PREVIOUS_ROWID and GET_NEXT_ROWID

    (if you do not use rowid as the primary key, another name will be generated).

  • Jump the numbering on the front pages

    I'm working on a several page brochure in InDesign CC2014 and I want to start numbering pages on what is basically page 6, jumping the lid of the numbering and the next four pages after, but I see no way to do it. I played with the numbering and section options, but nothing seems to work. Any help would be greatly appreciated.

    All the pages in your document must have a number assigned to them, but you don't need to show this number on the page.

    As says Willi, create a new section where you want your page numbering to start at 1 (this is called the 'logic' page number or section numbering). ID complain when you exit the dialog box that you already have a page with this number, so it's also a good idea to change the style of numbering for the front pages. Preliminary pages is traditionally numbered with lower case Roman numerals (i, ii, iii...), and I usually use A, B, c... cover and inside cover, with no marker page number on which pages should be numbered in the final doc.

  • Apex 5, call a modal page, set page elements, in values referenced title page elements are not the same (correct) than the item itself

    Hello

    Apex 5.

    IR (departments) on page 2 I want to open a modal page 3 (classic report) with the detail data (from emp) for a Masters depno via a link on depno column.
    In Page 3, I created two elements P3_DEPNO and P3_DNAME. These elements are defined in modal page 3 of page 2.
    When I do these two visible elements on page 3 I can see, the values are set correct according to the value in column (depno) link on page 2.
    However, I would like to place these element values in the page title of page 3
    Title: PGE for DepNo: & P3_DEPNO., DepName: & P3_DNAME.

    It happens that the values mentioned in the title of the page are not the same (good) as in the items himself.
    Initially, they are NULL. Only when I refresh page 2 the values change but remain the same (last called depno) as long as I'm doing a new refresh of page 2.

    I wonder how I can run to display the values of the correct point in the title of the page corresponding to the values of the correct page element (that I have hidden).

    Y at - it something more to do, or it could be a small bug?

    I've created a little demo app on
    https://Apex.Oracle.com/pls/Apex/f?p=75955:2

    WS: AMLWS001

    Demo/demo (developer is)

    Please see the report 1.

    Thank you in advance!

    André

    Hi andremi,

    andreml wrote:

    Hello

    Apex 5.

    IR (departments) on page 2 I want to open a modal page 3 (classic report) with the detail data (from emp) for a Masters depno via a link on depno column.
    In Page 3, I created two elements P3_DEPNO and P3_DNAME. These elements are defined in modal page 3 of page 2.
    When I do these two visible elements on page 3 I can see, the values are set correct according to the value in column (depno) link on page 2.
    However, I would like to place these element values in the page title of page 3
    Title: PGE for DepNo: & P3_DEPNO, DepName: & P3_DNAME.

    It happens that the values mentioned in the title of the page are not the same (good) as in the items himself.
    Initially, they are NULL. Only when I refresh page 2 the values change but remain the same (last called depno) as long as I'm doing a new refresh of page 2.

    I wonder how I can make it work to display the values of the correct point in the title of the page corresponding to the values point right page (what I have hidden).

    Y at - it something more to do, or it could be a small bug?

    Page title is rendered before the page elements, that is why is not highlighted in your title.

    I don't think directly, we can use the page as a page element value.

    Creates a copy of yours and made the change it new App id - 45390

    There, I created a static area without a model before your report area and put your article into that.

    then displayed title PGE for DepNo: & P3_DEPNO, DepName: & P3_DNAME. for the area of your report.

    Kind regards

    Jitendra

Maybe you are looking for

  • Problems after the installation of recovery disk

    Hello I just reinstalled Windows with my restore disk after that I install all my backups were useless because I had installed and not 32-bit 64-bit applications

  • How to see where it is directed to a link

    On all browsers, I know to show where a link leads to.whenever I have spend on them. This information is often shown in a status bar. I can't find how to do with Firefox.

  • Captain El installation stuck

    installed at El Captain on my iMac. After reboot, I have a white screen. I read online to restart. This did not help. Help!

  • HP Pavilion 11 x 360: the upgrade of processor/CPU

    I was wondering is it possible for me to upgrade the CPU on my laptop? I have currently Intel Celeron CPU N2840 @ 2.16 GHz ram size: 4 GB. I want to upgade it for Intel core i3 or i5, is this possible?

  • Functions Autonomating

    I'm trying to set up a 'writing' (inside a case structure) function when a boolean is set to true for writing certain values, however, I can't work properly. The first problem I get is that labview automatically inserts the nodes of comments. Another