DBMS_EPG Anonymous scheme and request-validation-function problem
matjazcMar 30 2010 — edited Mar 31 2010This is not completely APEX related, but I wonder if someone here could help:
I would like to call a procedure through EPG on 11R2 configured with Anonymous Authentication scheme and "request-validation-function" DAD attribute set.
Here is what I've done, after configuring ACL:
connect system;
begin
dbms_epg.create_dad('MY_DAD','/scott/*');
dbms_epg.set_dad_attribute('MY_DAD','database-username', 'ANONYMOUS');
commit;
end;
/
alter user anonymous account unlock
/
connect SCOTT;
create or replace package test as
function authorize return boolean;
procedure home;
end test;
/
create or replace package body test is
function authorize return boolean is
begin
return true;
end authorize;
procedure home is
begin
htp.p('You are served');
END home;
end test;
/
grant execute on test to public;
connect system;
create public synonym test for test;
So far so good: Entering url "http://oel:8181/scott/test.home" invokes a page correctly and I get "You are served".
Then I execute this:
connect system;
exec dbms_epg.set_dad_attribute('MY_DAD','request-validation-function','TEST.AUTHORIZE');
commit;
And when I refresh browser I get:
Not found
The requested URL /scott/test.home was not found on this server
If I remove DAD attribute:
exec dbms_epg.delete_dad_attribute('MC_DAD','request-validation-function');
commit;
... the page displays correctly again after reload.
Can anyone help please ?
Regards,
Matjaz