Hi all,
I have a problem with OWA_COOKIE-package. What I'm trying to do is to integrate Oracle eBS and an APEX app. The application resides on different databases and servers.
I'm basing my code on this white paper:
http://www.oracle.com/technology/products/database/application_express/pdf/Extend_Oracle_Applications_11i.pdf
I have the function set up in eBS and it redirects me to my APEX login page. The next step is to pass a cookie with the user name password to the APEX app. Here the problems begins.
My launch code in the eBS database (lots of hardcoded values just for the test):
PROCEDURE xxapex_launch (application IN NUMBER DEFAULT 107
, page IN NUMBER DEFAULT 1
, request IN VARCHAR2 DEFAULT null
, item_names IN VARCHAR2 DEFAULT NULL
, item_values IN VARCHAR2 DEFAULT NULL) AS
BEGIN
OWA_UTIL.mime_header('text/html', false);
OWA_COOKIE.send (name => 'APEX_APPS_107',
value => 'daniel:development',
expires => sysdate + 365,
path=>'/');
OWA_UTIL.redirect_url('http://server:8090'||'/apex/f?p='||
application||':'||page||'::'||request||':::'||
item_names||':'||item_values);
END xxapex_launch;
The application process in APEX that should read the cookie(on-load before header):
DECLARE
c OWA_COOKIE.cookie;
a wwv_flow_global.vc_arr2;
BEGIN
c := OWA_COOKIE.get('APEX_APPS_107');
a := htmldb_util.string_to_table(c.vals(1));
:P160_USERNAME := a(1);
:P160_PASSWORD := a(2);
IF :P160_PASSWORD IS NOT NULL THEN
wwv_flow_custom_auth_std.login(
P_UNAME => :P160_USERNAME,
P_PASSWORD => :P160_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':160');
__END IF;
END;
The error I get is no-data-found when this is run:
:P160_USERNAME := a(1);
The c.num_vals is 0 and what I can understand OWA_COOKIE.get does not find my cookie. Is there anybody out there that can point on what I'm doing wrong?
Regards Daniel