Sie sind auf Seite 1von 3

Re: Calling Portal wwsec_api from Apex

Re: Calling Portal wwsec_api from Apex


Source: http://newsgroups.derkeiler.com/Archive/Comp/comp.databases.oracle.tools/200612/msg00008.html

From: danny.roach@xxxxxxxxxx Date: 29 Nov 2006 07:27:38 0800 More info for anybody looking at this. I have tried prefixing the api with portal, that didn't work. The code handles the exception and gives me the amazingly helpful 'UserDefined Exception' error message. I also tried creating my own procedure within the portal schema that calls the api, this executes when run from sqlplus, but again not from apex. If I replace the api calls in the procedure with simple select stuff and then call the procedure from apex it works fine. So my code in the procedure on the database (in portal schema) looks like this create or replace procedure get_user_info(pa_user_name wwsec_person.user_name%type, op_first_name out wwsec_person.first_name%type) IS l_person_rec wwsec_person%rowtype; l_test varchar2(256); begin l_person_rec := wwsec_api.person_info ( p_user_name => pa_user_name ); /*select user_name into l_test from wwsec_person where user_name = pa_user_name;*/ op_first_name:=l_person_rec.first_name; exception when others then raise; end; / show errors I have granted execute on this procedure to apex_public_user Re: Calling Portal wwsec_api from Apex 1

Re: Calling Portal wwsec_api from Apex My code in apex that calls this procedure looks like this declare l_first varchar2(256); begin get_user_info('HANNAH', l_first); :P3_USER_INFO:= l_first; exception when others then :P3_USER_INFO:=sqlerrm; end; I am running out of ideas now, so any help would be appeciated. This is the output from sqlplus when I run the code as apex_public_user

variable apextest varchar2(256) execute portal.get_user_info('HANNAH', :apextest); BEGIN portal.get_user_info('HANNAH', :apextest); END; * ERROR at line 1: ORA06510: PL/SQL: unhandled userdefined exception ORA06512: at "PORTAL.WWCTX_SSO", line 1803 ORA06510: PL/SQL: unhandled userdefined exception ORA06512: at "PORTAL.WWCTX_SSO", line 1637 ORA06502: PL/SQL: numeric or value error ORA06512: at "PORTAL.WWCTX_SSO", line 1922 ORA06512: at "PORTAL.WWCTX_API", line 279 ORA06512: at "PORTAL.WWERR_API_ERROR", line 99 ORA06512: at "PORTAL.WWERR_API_ERROR", line 222 ORA06512: at "PORTAL.WWSEC_API_PRIVATE", line 5550 ORA06510: PL/SQL: unhandled userdefined exception ORA06512: at "PORTAL.WWCTX_SSO", line 1803 ORA06510: PL/SQL: unhandled userdefined exception ORA06512: at "PORTAL.WWCTX_SSO", line 1637 ORA06502: PL/SQL: numeric or value error ORA06512: at "PORTAL.GET_USER_INFO", line 19 ORA06512: at line 1

spool off

Thanks

On Nov 29, 3:26 pm, danny.ro...@xxxxxxxxxx wrote: Re: Calling Portal wwsec_api from Apex 2

Re: Calling Portal wwsec_api from Apex I am trying to call the portal.wwsec_api from within an apex application. The application is parsed using the portal schema so has all the correct grants by default. The code I am using is: declare l_person_rec wwsec_person%rowtype; begin l_person_rec := wwsec_api.person_info ( p_user_name => 'PORTAL' ); :P3_USER_INFO:=l_person_rec.user_name || l_person_rec.first_name; exception when others then :p3_user_info:=sqlerrm; end; This code (minus the item references) runs fine in sqlplus, but errors when I run it in apex. I have narrowed it down to the api that is erroring as I can access the table direct. Can anyone help with this? Thanks

Re: Calling Portal wwsec_api from Apex

Das könnte Ihnen auch gefallen