Вы находитесь на странице: 1из 32

Oracle Forms & a Service Oriented

Architecture (SOA).
A Whitepaper from Oracle Inc.
June 2007
Table of Content
OVERVIEW...............................................................................................................5
HOW CAN FORMS BE PART OF A SERVICE ORIENTED ARCHITECTURE?.................................5
THE THREE AREAS................................................................................................5
CALLING OUT FROM ORACLE FORMS...........................................................6
USE OF EXTERNAL SERVICES..........................................................................................6
CALLING JAVA............................................................................................................6
WEB SERVICES..........................................................................................................11
Basic flow.........................................................................................................11
Identifying the WSDL file.................................................................................11
Making the proxy..............................................................................................11
Package it all up...............................................................................................1
I!port into "or!s............................................................................................1
What if the We# ser$ice is secured with a password%......................................1&
BUSINESS PROCESS EXECUTION LANGUAGE (BPEL)......................................................14
'n exa!ple.......................................................................................................1(
EXPOSING FORMS BUSINESS LOGIC TO THE OUTSIDE WORLD.........18
OVERVIEW................................................................................................................1
A SIMPLE EXAMPLE....................................................................................................1
USING THE APPLICATION SERVER'S INFRASTRUCTURE......................22
ENTERPRISE MANAGER...............................................................................................!!
SINGLE SIGN"ON SERVER.............................................................................................!5
)nterprise *ser Security..................................................................................+
Switching it on..................................................................................................+
Defining users in ,ID......................................................................................-
CONCLUSION.........................................................................................................31
Oracle Forms and SOA. Page 2
Table of Figures
FIGURE 1: THE AVA IMPORTER MENU ITEM.............................................!
FIGURE 2: AVA IMPORTER DIALOG..............................................................!
FIGURE 3: BASIC FLOW.....................................................................................11
FIGURE ": WEB SERVICE PROX# WI$ARD..................................................12
FIGURE 5: BPEL PROCESS FLOW....................................................................15
FIGURE 6: APPL#ING FOR A LOAN................................................................16
FIGURE !: APPROVING THE LOAN.................................................................16
FIGURE 8: CHOOSING THE BEST OFFER......................................................1!
FIGURE %: EXAMPLE FORM..............................................................................18
FIGURE 1&: SCOTT IS LOGGED ON AND HE IS NOT THE PRESIDENT
SO HE CANNOT SEE 'ING'S SALAR#............................................................2&
FIGURE 11: COP#ING A FUNCTION TO THE DATABASE.........................21
FIGURE 12: FORMS EM HOME PAGE.............................................................22
FIGURE 13: EM USER SESSIONS PAGE...........................................................23
FIGURE 1": EM CONFIGURATIONS PAGE....................................................23
FIGURE 15: EM TRACE CONFIGURATIONS PAGE.....................................2"
FIGURE 16: EM ENVIRONMENT PAGE..........................................................2"
FIGURE 1!: EM VM CONTROLLERS PAGE.................................................25
FIGURE 18: EM UTILITIES PAGE.....................................................................25
FIGURE 1%: SSO FLOW........................................................................................26
FIGURE 2&: SWITCHING ON SSO.....................................................................2!
FIGURE 21: SINGLE SIGN(ON EXAMPLE.......................................................2!
Oracle Forms and SOA. Page 3
FIGURE 22: LOGGIN ON TO PORTAL.............................................................28
FIGURE 23: ADMINISTER PAGE.......................................................................28
FIGURE 2": CREATE NEW USER......................................................................2%
FIGURE 25: NEW USER PAGE............................................................................2%
FIGURE 26: RESOURCE ACCESS DESCRIPTOR...........................................3&
FIGURE 2!: NAME THE RAD..............................................................................3&
FIGURE 28: RAD LOGIN INFORMATION.......................................................31
Oracle Forms and SOA. Page 4
Oracle Forms and a Service Oriented Architecture
OVERVIEW
More and more businesses are looking to the rinciles of Service Oriented
Architecture (SOA) to align their business and !.T. needs. The abilit" to build
services modeled on business functions# reuse and orchestration of common#
loosel" couled services and the agilit" associated $ith $orking $ith modular
services# built on recogni%ed standards# are attractive otions.
Oracle Forms has been ver" successful in the market lace but has traditionall"
been a monolithic tool. &ou either used Forms (and 'eorts and ossibl"
(rahics) and onl" Forms or "ou didn)t use it. !n the ne$ $orld of disarate and
distributed services making u much of ne$ develoment Forms has been changed
from being monolithic to being art of a Service Oriented Architecture.
How can Forms be part o a Ser!"ce Or"ented Arc#"tect$re%
'ecent versions of Oracle Forms has gained functionalit" that makes it ossible to
integrate e*isting (or ne$) Forms alications $ith ne$ or e*isting develoment
utili%ing the Service Oriented Architecture concets.
+ith its suort for ,ava and its integration into SOA# Forms rovides an
incremental aroach for develoers $ho need to e*tend their business latform to
,--. This allo$s Oracle Forms customers to retain their investment in Oracle
Forms $hile leveraging the oortunities offered b" comlementing technologies.
.ut ho$ do "ou actuall" integrate Forms $ith a Service Oriented Architecture.
/o$ can Forms be a art of SOA0 This $hiteaer is meant to shed some light on
this toic.
&HE &HREE AREAS
There are three areas $here Oracle Forms can be integrated $ith a Service
Oriented Architecture1
'se o e(ternal ser!"ce
+ith functionalit" recentl" added to Forms it is no$ ossible to call from
Forms to ,ava making it feasible to use +eb services and .2-3 rocesses.
Oracle Forms and SOA. Page )
Oracle rema"ns $ll* comm"tted to t#e
de!elopment o Oracle Forms. See t#e
Statement o d"rect"on at
#ttp+,,otn.oracle.com,prod$cts,orms
E(pos$re o Oracle Forms b$s"ness log"c to t#e o$ts"de world
!n a $orld of distributed alications# Forms code might need to be moved out
of Forms and into a lace $here it can be used b" other alications. This
section covers ho$ to achieve that.
's"ng t#e Appl"cat"on Ser!er-s "nrastr$ct$re.
Oracle Forms coe*ists and integrates $ith Oracle)s Alications Server)s
infrastructure functionalit". Forms) integration $ith Oracle Single Sign4on and
-nterrise Manager is covered in this section.
.A//I01 O'& FRO2 ORA./E FOR2S
'se o e(ternal ser!"ces
Oracle Forms use of e*ternal services hinges on recent functionalit" regarding ,ava
integration. Oracle Forms can call out to ,ava on the file s"stem. !t can make use of
,ava beans and its native screen $idgets can be customi%ed $ith custom ,ava code
(the 2luggable ,ava Comonent architecture). !n this section $e are going to touch
on the functionalit" of calling out to ,ava code residing on the file s"stem.
Once that functionalit" $as ut in lace Oracle Forms $as able to call all kinds of
e*ternal services such as +eb services and be art of a .2-3 rocess flo$. .ut
let)s start at the beginning.
.all"ng 3a!a
The functionalit" that makes it ossible to call out to ,ava on the file s"stem is
called the ,ava !morter. !t is incororated into the Forms .uilder and takes a class
as an inut and creates a 235S63 ackage that acts as a $raer around the ,ava
class making it ossible to call ,ava code from a 235S63 trigger or
function5rocedure.
Oracle Forms and SOA. Page 4
F"g$re 5+ &#e 3a!a Importer men$ "tem
The ,ava !morter scans the local machine in the directories secified in the
'egistr" variable FO'MS7.8!39-'7C3ASS2AT/ and finds all ,ava class files.
F"g$re 2+ 3a!a Importer d"alog
Oracle Forms and SOA. Page 6
&#e Importer can scan 3AR "les onl* one le!el
deep. It cannot "nd class "les "n 3AR "les t#at
are "n t$rn "n a 3AR "le.
8sing the ne$ built4in ackages ora_java and jni, the !morter $ill take a
class definition like the follo$ing one and make a 235S63 $raer ackage.
public class Dates {
public static void main(String[] args) {
System.out.println(theDate());
}
public static final String theDate() {
return new Date().toString();
}
}
The ackage $ill be created $ith the name of the class. -ach ublic ,ava function
$ill have a corresonding 235S63 function and each ,ava function returning void
$ill result in a corresonding 235S63 rocedure1
PACKAGE BODY dates IS
args !".#$%&"S';
(( )onstru*tor +or signature (),
FUC!IO new "E!U" -$#_#,#.-./)' IS
BEGI
args #$ !0&&;
"E!U" (!".!/1_-./)'(2+ormstest3dates2,
2(),2, args));
ED;
(( 4ethod5 main ([&java3lang3String;),
P"OCEDU"E main(
a6 -$#_#,#.#$$#7) IS
BEGI
args #$ !".)$/#'/_#$%_&"S'(8);
!".#DD_-./)'_#$%(args, a6,
2[&java3lang3String;2);
!".)#&&_,-"D_4/'9-D('$0/, !0&&,
2+ormstest3dates2, 2main2,
2([&java3lang3String;),2, args);
ED;
(( 4ethod5 theDate ()&java3lang3String;
FUC!IO theDate "E!U" %A"C&A"' IS
BEGI
args #$ !0&&;
"E!U" !".)#&&_S'$"!%_4/'9-D('$0/, !0&&,
2+ormstest3dates2, 2theDate2,
2()&java3lang3String;2, args);
ED;
BEGI
!0&&;
ED;
Oracle Forms and SOA. Page 7
,ava classes declared static# classes that are al$a"s instantiated $ith one and onl"
instance in a ,ava alication# $ill have no ne: functions generated.
The ackage code can subse:uentl" be used to# at runtime# call out to the ,ava code
and return not ;ust scalar values as in this e*amle but comle* data structures like
arra"s and ,ava ob;ects. There are functions in the ora_java built4in 235S63
ackage to maniulate arra"s and comle* data t"es.
At runtime the class files needs to be accessible to the Forms runtime. To do that
"ou add either the full ath to the director" the class file is in or add the full ath to
the ,A' file to the C3ASS2AT/ environment variable in the default.env file (see
the -M section belo$ for more information).
!t is also ossible to imort s"stem classes and thus maniulate ,ava data t"es and
e*tract data that can be used in 235S63.
One such e*amle is the java.lang./;*eption class. The follo$ing is a
artial reresentation of the 235S63 ackage code that is the result of imorting
the /;*eption class.
PACKAGE BODY /;*eption_ IS
args !".#$%&"S';
(( )onstru*tor +or signature
(( (&java3lang3'hro:a<le;),
FUC!IO new(
a6 -$#_#,#.-./)') "E!U" -$#_#,#.-./)' IS
BEGI
args #$ !".)$/#'/_#$%_&"S'(8);
!".#DD_-./)'_#$%(args, a6,
2java3lang3'hro:a<le2);
"E!U" (!".!/1_-./)'(2java3lang3/;*eption2,
2(&java3lang3'hro:a<le;),2, args));
ED;
(( 4ethod5 toString ()&java3lang3String;
FUC!IO toString(
o<j -$#_#,#.-./)') "E!U" %A"C&A"' IS
BEGI
args #$ !0&&;
"E!U" !".)#&&_S'$"!%_4/'9-D(=#&S/, o<j,
2java3lang3/;*eption2, 2toString2,
2()&java3lang3String;2, args);
ED;
BEGI
!0&&;
ED;
The resulting -*cetion7 class is used in this 235S63 function sho$n in more
deth later in this $hite aer $hen obtaining a currenc" conversion rate from a
+eb service.
Oracle Forms and SOA. Page 8
.+9appl"cat"ons9e(ampleApp9classes9 or
.+9appl"cat"ons9e(ampleApp9:ars9e(mpl.:ar
-E(cept"on- "s a reser!ed word "n P/S;/ so
t#e "mporter resol!es a potent"al nam"ng
conl"ct b* add"ng an $nderscore.
The /;*eption_.toString call is used to get a character reresentation of
an e*cetion obtained from ,ava that is of a t"e 235S63 cannot understand but
,ava can.
function get_*onversion_rate(*urren*y_*ode varc(ar')
return nu)ber IS
*onv ora_java.jo<je*t;
rate ora_java.jo<je*t;
e;*ep ora_java.jo<je*t;
be*in
*onv#$*urren*y)onverter.new;
rate#$*urren*y)onverter.getrate(*onv,
20SD2,
*urren*y_*ode);
return +loat_.+loatvalue(rate);
e+ception
w(en ora_java.java_error t(en
message(2/rror5 2,,ora_java.last_error);
return 6;
w(en ora_java.e;*eption_thro:n t(en
e;*ep#$ora_java.last_e;*eption;
message(2/;*eption5
2,,/;*eption_.toString(e;*ep));
return 6;
end;
Oracle Forms and SOA. Page 5<
Web Ser!"ces
A +eb service is a iece of code that can accet remote rocedure calls using the
/TT2 rotocol and an <M3 based data format called SOA2 and return data in the
form of <M3 to the originator. +eb services are a ma;or art of an" Service
Oriented Architecture and makes it ossible to distribute business logic e*osed as
a service onto servers on the local net$ork or even the !nternet.
Forms cannot make use of a +eb service directl" but no$ that $e kno$ ho$ to
call out to ,ava $e can make it haen. +ith a ro*" made in Oracle)s ,9eveloer
$e can call an" +eb Service from Forms.
=as"c low
F"g$re 3+ =as"c Flow
Ident"*"ng t#e WS>/ "le
A +eb service is defined b" a +S93 (+eb Service 9escrition 3anguage) file. !t
has definitions on ho$ to call the service and $hat "ou can e*ect as return data.
Since a +eb service is a net$ork service# its definition is also a net$ork resource.
The administrator of the +eb service "ou are interested in# should be able to tell
"ou ho$ to get the +S93 file 8'3. +eb services ma" be ublished in 8niversal
9escrition 9iscover" !ntegration (899!) registr" $hich acts like a telehone
director" of +eb services.
2a?"ng t#e pro(*
A ro*"# in this conte*t means a ,ava class that has been instrumented to kno$
ho$ to call a secific +eb service. Oracle)s ,9eveloer can hel us to make the
ro*".
,9eveloer has a $i%ard that takes a +S93 file as inut and creates a ,ava ackage
that $e can subse:uentl" imort into Forms# making it ossible for our Forms
alication to call the +eb service.
Oracle Forms and SOA. Page 55
See t#"s l"n? to learn more abo$t t#e
WS>/ "le standard.
Once "ou have the +S93 file 8'3 "ou can lug it in to the ,9eveloer +eb
Service 2ro*" +i%ard. The screen shot belo$ has a +S93 file alread" lugged in.
F"g$re 4+ Web ser!"ce Pro(* W"@ard
The name of the service defined in this +S93 file is CurrConv and the $i%ard has
icked that u. See this link for e*act instructions on ho$ to make a +eb service
ro*".
Pac?age "t all $p
See this link to learn ho$ to ackage the +eb service ro*" that "ou have created
u so that "ou can imort it into Forms.
Import "nto Forms
Once "ou have the ro*" class "ou can imort it into Forms and call its functions
from 235S63 code. The oerative functions imorted from the ro*" are listed
belo$1
pac-a*e )urren*y)onverter
3> *urr*onv?.mypa*@age.)urr)onv?Stu< >3 IS
function new return ora_java.jo<je*t;
function getrate(
o<j ora_java.jo<je*t,
a6 varc(ar',
a8 varc(ar') return ora_java.jo<je*t;
end;
Oracle Forms and SOA. Page 52
The get'ate function is the function that $e are after. !t takes t$o currenc"
s"mbols and returns a ,ava ob;ect that $e kno$ is a number of t"e float (the first
argument is the class instance and $ill be described later).
The +/-=4.8TTO=42'-SS-9 trigger code is listed belo$1
function get_*onversion_rate(*urren*y_*ode varc(ar')
return nu)ber IS
*onv ora_java.jo<je*t;
rate ora_java.jo<je*t;
e;*ep ora_java.jo<je*t;
be*in
*onv#$*urren*y)onverter.new;
rate#$*urren*y)onverter.getrate(*onv,
20SD2, *urren*y_*ode);
return +loat_.+loatvalue(rate);
e+ception
w(en ora_java.java_error t(en
message(2/rror5 2,,ora_java.last_error);
return 6;
w(en ora_java.e;*eption_thro:n t(en
e;*ep#$ora_java.last_e;*eption;
message(2/;*eption5
2,,/;*eption_.toString(e;*ep));
return 6;
end;
This code delivers the rate used in the alication. !t takes a currenc" s"mbol (in
this e*amle $e onl" convert from 8S dollars) as an argument and returns a
235S63 number $hich holds the rate.
+e first declare three local variables of t"e ,O.,-CT (,O.,-CT is a t"e defined
in the ora7;ava ackage reresenting a ,ava ob;ect of an" kind). The first line after
begin fetches a reference to an instance of the ro*" and stores it in the variable
*onv. The second line gets the rate from that instance. The return clause makes a
number from the resulting rate ,ava ob;ect $ith the hel of an imorted ,ava
s"stem class# java.lang.=loat. !t has a call# +loat,alue# $hich converts a
float to a number# $hich is $hat $e need here (Forms cannot handle a ,ava float
directl" but it can handle a number).
The e*cetion handler is reached if an" of the calls out to ,ava causes (thro$s is the
term used in ,ava) an e*cetion or an error. !n case of an e*cetion $e get the
e*cetion $ith the hel of the ora_java ackage call last_e;*eption. To
actuall" see it# $e call an imorted -*cetion7 ackage routine called toString.
W#at " t#e Web ser!"ce "s sec$red w"t# a password%
This age has a good tutorial on ho$ to change a +eb service ro*" to use
authentication.
Oracle Forms and SOA. Page 53
Ao$ m"g#t be c$r"o$s abo$t w#* t#e "nstance
"s passed "n rat#er t#an operated on d"rectl*
and t#e reason "s t#at P/S;/ "s not ob:ect
or"ented eno$g# to perorm t#at tr"c?.
=$s"ness Process E(ec$t"on /ang$age B=PE/C
=o$ that $e have established that Forms can call out to ,ava and use +eb services#
$e can start looking at .2-3 or .usiness 2rocess -*ecution 3anguage. .2-3 is an
emerging standard for orchestrating disarate and heterogenous business services
into a rocess flo$. Oracle offers a comrehensive .2-3 solution and Forms can
take art in a .2-3 rocess flo$ as a manual rocess ste or as an initiating ste or
both.
An e(ample
!n the follo$ing e*amle Forms is going to act both as an initiator and as a manual
rocess ste. The rocess is that of a consumer loan. The business flo$ diagram
belo$ outlines $hat the rocess looks like.
Oracle Forms and SOA. Page 54
F"g$re )+ =PE/ Process Flow
The rocess first receives an alication for a consumer loan. This ste is
erformed in a Forms alication that communicates $ith the .2-3 server
through either a +eb service e*osed b" the .2-3 server or b" $a" of a ,ava
interface sulied b" Oracle as a art of the .2-3 server.
Oracle Forms and SOA. Page 5)
F"g$re 4+ Appl*"ng or a /oan
The screenshot above sho$s the alication that the fictitious user 9ave uses to
send in his alication for a car loan. +hen the user clicks the Submit button the
Forms alication sets in motion the .2-3 rocess flo$ described earlier. The
rocess fetches 9ave)s Social Securit" =umber and then gets his credit rating. As
the develoer of the alication that 9ave uses $e don)t have to kno$ ho$ this is
achieved. That is u to the develoer of the .2-3 rocess. +e ;ust need to kno$
ho$ to kick off the rocess.
After having fetched 9ave)s credit rating the .2-3 rocess collects t$o offers
from t$o different loan vendors# Star 3oans and 8nited 3oans. 8nited 3oans uses
an automated rocess that $e# in this e*amle# are not interested in. Star 3oan on
the other hand uses a manual rocess that is imlemented in a Forms alication.
F"g$re 6+ Appro!"ng t#e /oan
The loan officer at Star 3oan :ueries the .2-3 rocess and sees that an alication
has arrived from 9ave. /e5she determines the aroriate interest rate and clicks
the Arove button. This $ill kick off the ne*t ste of the rocess $here 9ave has
the oortunit" to select the best offer. /e does that in the same Forms alication
he used earlier1
Oracle Forms and SOA. Page 54
F"g$re 7+ .#oos"ng t#e =est Oer
9ave sees the t$o loan offers in his alication and can select the best offer b"
clicking the Accet button. This $ill again cause Forms to communicate $ith the
.2-3 server and causes the rocess to conclude.
=ote the 'efresh button. Forms could otentiall" oll the .2-3 server $ith the
hel of a Forms timer. This alication does not do that. !nstead 9ave has to
manuall" :uer" the .2-3 rocess. Forms cannot "et (as of version >?.>.@) easil"
register an interest in a .2-3 event and automaticall" be notified if inut is needed
from it. !n version >> of Forms $e intend to have functionalit" in lace that $ill
make this much easier.
For more information on ho$ to achieve .2-3 integration and a $orking e*amle#
see this link.
Oracle Forms and SOA. Page 56
Alt#o$g# Forms cannot rece"!e
"ncom"ng e!ents o$tDoDt#eDbo( "n
5<.5.2E t#ere "s a wa* to do "t. See t#"s
l"n? or more "normat"on.
EFPOSI01 FOR2S ='SI0ESS /O1I. &O &HE O'&SI>E WOR/>
O!er!"ew
So far $e have covered ho$ Forms can call out to the outside $orld. +hat about
the oosite0 Can the outside $orld use e*isting Forms business logic0 2erhas as
e*osed as a +eb service0 Or could Forms business logic ($hich is $ritten in
235S63) be called directl"0
The ans$er is a :ualified &es. As a develoment tool# the fact that the user
interface and the business logic are so closel" integrated# makes the develoment of
Forms ver" simle and intuitive. /o$ever# this tight integration of 8! code and
business logic makes the e*osure of the ure business services to outside
consumers# much more challenging.
!t is ho$ever ossible to move Forms 235S63 code from Forms to the database
and from there e*ose it to the outside $orld# either as a database rocedure5A
function or as a 235S63 +eb service.
A s"mple e(ample
!n this simle e*amle $e have a block in Forms $ith a column labeled Salar" that
sho$s the total salar" for the emlo"ees in the -m table. The sum is calculated
$ith a 2OST468-'& trigger.
F"g$re 8+ E(ample orm
The trigger calls a local (it is e*ecuted b" Forms rather than the database) 235S63
function thus1
Oracle Forms and SOA. Page 57
function *al*_total_sal return nu)ber is
total nu)ber;
l_mgr nu)ber;
l_mgr_name varc(ar'(?6);
usr varc(ar'(A66)#$
get_appli*ation_property(username);
be*in
sele*t mgr into l_mgr
+rom emp
:here empno$5emp.empno;
sele*t ename into l_mgr_name
+rom emp
:here mgr is null;
if (l_mgr is not null) t(en
sele*t sal.nvl(*omm,6) into total
+rom emp
:here empno$5emp.empno;
elsif (usr/0l_mgr_name) t(en
total#$18;
elsif (usr$l_mgr_name) t(en
sele*t sal.nvl(*omm,6) into total
+rom emp
:here empno$5emp.empno;
end if;
return total;
end;
The business logic imlemented in the function is this1 !f the emlo"ee $hose
salar" is being calculated is not the 2resident# calculate his total salar" b" adding
columns sal and comm together# taking into account that the comm column can
otentiall" be null. !f the emlo"ee ro$ is the 2resident)s and the current user is not
the 2resident return 4> other$ise return the total salar" for the 2resident (nobod"
but the 2resident can see the salar" of the 2resident of the coman").
To use this code from the database $e need to refactor it. The database does not
understand references to an" Forms ob;ects nor does it understand an" of the
Forms secific 235S63 built4ins. !n this case $e have a call to a Forms built4in#
namel" get_appli*ation_property. +e also have a reference to the
emno field. !f $e take them out and ass them in as arameters the function no$
looks like this1
function *al*_total_sal(l_empno nu)ber3 usr varc(ar')
return nu)ber is
total nu)ber;
l_mgr nu)ber;
l_mgr_name varc(ar'(?6);
be*in
sele*t mgr into l_mgr
+rom emp
:here empno$l_empno;
Sele*t ename into l_mgr_name
+rom emp
:here mgr is null;
Oracle Forms and SOA. Page 58
if (l_mgr is not null) t(en
sele*t sal.nvl(*omm,6) into total
+rom emp
:here empno$l_empno;
elsif (usr/0l_mgr_name) t(en
total#$18;
elsif (usr$l_mgr_name) t(en
sele*t sal.nvl(*omm,6) into total
+rom emp
:here empno$l_empno;
end if;
return total;
end;
=ote that the variables usr and l7emno are no$ e*ternal and have to be assed in.
The 2OST468-'& trigger has to change accordingl"# to sa"B
5emp.total_sal5B*al*_total_sal(5emp.empno,
get_appli*ation_property(username);
but after that it $ill continue to function as before.
F"g$re 5<+ Scott "s logged on and #e "s not t#e Pres"dent so #e cannot see
GI01-s salar*
Moving a 235S63 rocedure from a form definition file to the database can be
achieved in the Forms .uilder b" dragging and droing the 235S63 unit bet$een
a form module and a database node in the Forms navigator.
Oracle Forms and SOA. Page 2<
F"g$re 55+ .op*"ng a F$nct"on to t#e >atabase
=o$ that $e have the Forms 235S63 code in the database# $e can leverage its
business logic in an" alication that can call a database function.
+ith the hel of ,9eveloer $e can no$ also make a +ebservice out of the code#
making it ossible for environments that cannot directl" call into the database but
$hich can call a +eb service# to leverage legac" Forms code.
See this $eb age for more information on ho$ to use ,9eveloer to make a +eb
service from database 235S63 code.
Oracle Forms and SOA. Page 25
'SI01 &HE APP/I.A&IO0 SERVER-S I0FRAS&R'.&'RE
+hen Forms becomes a art of a larger setting it needs to be able to articiate in
alication server $ide functions such as maintenance and management and user
authentication. !t doesn)t make much sense to have one alication use its o$n
authentication scheme and all the others use another scheme. !n versions C and >?
Forms is a full member of the Alication Server infrastructure and is automaticall"
configured to be able to use both the Single Sign4on server (Oracle O!9 and SSO)
and to be managed thru Oracle -nterrise Manager.
Enterpr"se 2anager
As art of the Oracle Alication Server latform# Oracle Forms alications can
no$ be managed remotel" through Oracle -nterrise Manager)s Alication Server
Control running in a bro$ser.
This is the screen that meets the administrator $hen he logs onto the Alication
Server Control console1
F"g$re 52+ Forms E2 Home page
!n this overvie$ screen the administrator can monitor the over4all status of the
s"stem and critical metrics such as C28 and memor" usage for Forms and its main
comonents.
Oracle Forms and SOA. Page 22
F"g$re 53+ E2 'ser Sess"ons page
!n this ne*t screen# called 8ser Sessions# each user)s session is listed $ith crucial
metrics such as its C28 and memor" usage# !2 address and username and trace
settings. The configuration section used $hen starting the alication is also
sho$n. !f tracing is turned on from here the trace log can be vie$ed from this
console. !ndividual user sessions can be terminated from here.
F"g$re 54+ E2 .on"g$rat"ons page
Oracle Forms and SOA. Page 23
!n this section "ou can create# edit and delete configuration settings in three
different configuration files1 the forms$eb.cfg $hich is the main configuration file
for a Forms installation# the ftrace.cfg $hich is the trace facilit" configuration file
and the 'egistr".dat file $hich governs the font maing. /ere is a screenshot of
the ftrace section1
F"g$re 5)+ E2 &race .on"g$rat"ons page
F"g$re 54+ E2 En!"ronment page
!n this -nvironment screen the administrator can maniulate environment settings
stored in the default.env file that ertain to Forms1
Oracle Forms and SOA. Page 24
F"g$re 56+ E2 3V2 .ontrollers page
,DM Controllers are used to reduce memor" re:uirements $hen calling ,ava from
the file s"stem and the" are controlled from this screen.
F"g$re 57+ E2 't"l"t"es page
The last screen is used for additional functionalit" not "et accessible from other
screens.
S"ngle s"gnDon ser!er
Changing Forms to use the Single Sign4on server rather than its o$n database
based user authentication method is a matter of setting a flag in a configuration file.
Oracle Forms and SOA. Page 2)
Once Forms is set u to use SSO# Forms users $ho are logged on because the"
have done so in their Forms alication need not reauthenticate themselves $hen
the" log in to a 2ortal or a ,ava alication.
SSO4based authentication haens in E stes. !n ste > the user sulies his creA
dentials (username and ass$ord). !nstead of calling the database to authenticate
the user# Forms calls the SSO server $ho in turn :ueries the O!9539A2 server to
see if the user has enough rivileges. !f so# it returns the actual database username
and ass$ord that $ill be used b" Forms to log on. 9uring the session Forms can
access data about the logged in user from the O!9 reositor" thru a 235S63 A2!.
The same single sign4on instance can of course be used b" other alications
served from the same alication server so users need not be stored in multile
laces and can be authenticated onl" once# namel" the first time the" log in to an"
of the alications making use of the same SSO Server.
SSO H OI>
EndD'ser
OI>,/>AP
Forms
S"ngle S"gnDOn
>atabase
5
2
3
4
)
F"g$re 58+ SSO low
Enterpr"se 'ser Sec$r"t*
The database can also use the Single Sign4on server as its authentification scheme
$ith functionalit" called -nterrise 8ser Securit". This makes it ossible to store
authentication information in a single lace# both for access to the database thru an
alication and thru direct means# such as S63F2lus or the ne$ S63 9eveloer.
Sw"tc#"ng "t on
Making Forms use the Single Sign4on server is as eas" as s$itching a s$itch in the
forms$eb.cfg file.
Oracle Forms and SOA. Page 24
F"g$re 2<+ Sw"tc#"ng on SSO
/ere $e are setting the ssoMode s$itch in -nterrise Manager)s Alication Server
Configuration section to true. This is all that is needed to enable SSO in a default
Forms installation. +hen a user starts a Forms alication he5she $ill be met b"
this SSO login screen instead of b" the normal Forms login $indo$1
F"g$re 25+ S"ngle S"gnDon e(ample
Oracle Forms and SOA. Page 26
>e"n"ng $sers "n OI>
SSO users must be defined in O!9. That can be done in 2ortal. 3og in as
orcladmin after clicking on the link in the Alication Server $elcome screen that
is highlighted in the follo$ing screenshot1
F"g$re 22+ /ogg"n on to Portal
Click the Administer tab $hen "ou arrive at this screen1
F"g$re 23+ Adm"n"ster page
This $ill take "ou to a art of the 2ortal builder that has a user interface for O!9
management. To create a ne$ user# click the link in the 8ser ortal in the to right
hand corner that is highlighted in the follo$ing screenshot1
Oracle Forms and SOA. Page 27
F"g$re 24+ .reate new $ser
9oing that $ill oen u this screen $here "ou can secif" all the data "ou $ill need
about the user# such as First and 3ast name# username# e4mail# ermissions and
roles.
F"g$re 2)+ 0ew 'ser page
A mandator" art (for Forms users) that is not entirel" obvious is the 'esource
Access !nformation art1
Oracle Forms and SOA. Page 28
F"g$re 24+ Reso$rce Access >escr"ptor
This information $ill be used b" Forms (and 'eorts incidentall") $hen logging on
to the database. The user $ill be authenticated b" the information secified in this
big screen but the actual log4in $ill be done $ith the account secified in this
section.
To create a ne$ resource click the Create 'esource button and fill in the name of
the resource in this screen1
F"g$re 26+ 0ame t#e RA>
The resource t"e should be Oracle9.. Click the =e*t button to get to this screen1
Oracle Forms and SOA. Page 3<
F"g$re 27+ RA> log"n "normat"on
This is $here "ou secif" the database account name# ass$ord and the T=S name
used b" Forms to log in. After "ou click the Submit button the 'esource Access
9escritor or 'A9# is created for this one user. This has to be done for all users.
.O0./'SIO0
This $hiteaer has covered the toic of integrating Oracle Forms $ith a Service
Oriented Architecture. +e had a look at ho$ Forms can call out to ,ava# thus
making it ossible to make us of +eb services and rocess flo$s orchestrated b"
.2-3. +e touched on the rocess of e*osing e*isting Forms code to SOA
rocesses b" refactoring the code and moving it to the Oracle 9atabase. Finall" $e
e*lored ho$ Forms can take advantage of the remote management caabilities or
Oracle -nterrise Management (-M) and of centrali%ed user authentication b" $a"
of Oracle !dentit" Management (SSO and O!9).
Oracle Forms and SOA. Page 35
See t#"s l"n? or more deta"led "normat"on
on #ow to man"p$late RA>s at r$nt"me and
ot#er $se$l "normat"on concern"ng Forms
$se o OI>. &#e l"n? "s abo$t Forms
!ers"on 8 b$t "s st"ll rele!ant or !ers"on
5<.5.2.
W#"te Paper rom Oracle .orporat"on
2arc# D 3$ne 2<<6
A$t#or+ 3an .arl"n
.ontr"b$t"ng A$t#ors+ >$ncan 2"lls
Oracle .orporat"on
World HeadI$arters
)<< Oracle Par?wa*
Redwood S#oresE .A 84<4)
'.S.A.
Worldw"de InI$"r"es+
P#one+ J5.4)<.)<4.6<<<
Fa(+ J5.4)<.)<4.62<<
oracle.com
.op*r"g#t K 2<<6E Oracle. All r"g#ts reser!ed.
&#"s doc$ment "s pro!"ded or "normat"on p$rposes onl* and t#e
contents #ereo are s$b:ect to c#ange w"t#o$t not"ce.
&#"s doc$ment "s not warranted to be errorDreeE nor s$b:ect to an*
ot#er warrant"es or cond"t"onsE w#et#er e(pressed orall* or "mpl"ed
"n lawE "ncl$d"ng "mpl"ed warrant"es and cond"t"ons o merc#antab"l"t*
or "tness or a part"c$lar p$rpose. We spec""call* d"scla"m an*
l"ab"l"t* w"t# respect to t#"s doc$ment and no contract$al obl"gat"ons
are ormed e"t#er d"rectl* or "nd"rectl* b* t#"s doc$ment. &#"s doc$ment
ma* not be reprod$ced or transm"tted "n an* orm or b* an* meansE
electron"c or mec#an"calE or an* p$rposeE w"t#o$t o$r pr"or wr"tten perm"ss"on.
Oracle "s a reg"stered trademar? o Oracle .orporat"on and,or "ts a"l"ates.
Ot#er names ma* be trademar?s o t#e"r respect"!e owners.