Getting Started With Oracle SoA 9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

Getting Started with Oracle SoA Oracle SOA Working with Custom Faults Lab#9

Description BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginners G ide !or "racle So#. The doc ment !oc ses on $or%ing with & stom 'a lts. (oin o r pro!essional training program and learn !rom e)perts.

Histor*+ ,ersion ../ ../

-escription &hange Initial -ra!t 2eview3/

# thor Shiva 0ant Pande* #mit Sharma

P blish -ate 1/st # g 1./1 14th # g 1./1

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /

Contents
&ontents....................................................................................................................................... 1 $or%ing with & stom !a lts ......................................................................................................... 5 Step wise proced re on topper st dent pro6ect with !a lt handling 7c stom !a lt8+.....................5 9otive o! Switch #ctivit*.............................................................................................................. :

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1

$or%ing with & stom !a lts !"$hat are c stom !a lts ; A" & stom !a lts are those !a lts which is de!ined b* developer !or certain limitations . Summar# #im o! c stom !a lt pro6ect is that to catch those !a lts which are de!ined b* developer at the time o! service development so here in topper st dent pro6ect when someone inp t wrong st dent mar%s i.e inp t mar%s o! individ al s b6ect sho ld not be smaller than <ero = greater than h ndred , so this %ind o! restrictions are provided b* developer so i! wrong mar%s inp t then it shows c stom !a lt message that inp t mar%s is invalid .

Step wise procedure on topper student pro$ect with %ault handling &custom %ault"
Step ' "pen ProcessSt dent Pro6ect = nder it open ProcessSt dentProcess.bpel as shown below

Step ( In design mode -rag = -rop Switch #ctivit* so that bpel can set condition

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5

Step ) &lic% on condition part to set i% condition !or switch activit*

*oti+e o% Switch Acti+it#


" r motive is setting condition that i! mar%s are smaller than <ero or greater than h ndred then throw c stom>b siness !a lt = also repl* this !a lt as o tp t else choose otherwise condition i! inp t mar%s are correct = %eep all components inside this otherwise condition Step , &lic% on E)pression b ilder shown below + www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page :

Step - &lic% on lang/ mar%s ---? insert into e)pression ---? @ogical ' nction ----? smaller ---? insert into e)pression ---? . 7<ero8 or &lic% on lang/ mar%s ---? insert into e)pression ---? @ogical ' nction ----? greater ---? insert into e)pression ---? /.. 7h ndred8 or &lic% on lang1 mar%s ---? insert into e)pression ---? @ogical ' nction ----? smaller ---? insert into e)pression ---? . 7<ero8 or &lic% on lang1 mar%s ---? insert into e)pression ---? @ogical ' nction ----? greater ---? insert into e)pression ---? /.. 7h ndred8 or &lic% on lang5mar%s ---? insert into e)pression ---? @ogical ' nction ----? smaller ---? insert into e)pression ---? . 7<ero8 or &lic% on lang5 mar%s ---? insert into e)pression ---? @ogical ' nction ----? greater ---? insert into e)pression ---? /.. 7h ndred8 as shown below

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page A

Step . &lic% on "% .

Step /

-rag = drop #ssign #ctivit* = 2ename It as #ssign& stom'a lt +

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page B

Step 0 -rag = drop Throw #ctivit* CThis activit* throws the !a lt data to the catch activit*C

Step 9 2ename throw activit* as ThrowInvalid9ar%s'a lt

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page D

Step '1 -o ble &lic% "n Throw activit* = Edit Throw activit* , &lic% "n Browse icon shown below

Step '' "bserve that there is no !a lt message nder Pro6ect $S-@ 'iles in ProcessSt dentProcess.wsdl so !irst create !a lt message inside ProcessSt dent wsdl !ile !or c stom !a lt .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page E

Step '( "bserve ProcessSt dentProcess.wsdl in design mode that inside port t*pe it has onl* two process one is Inp t = other o tp t b t not containing 'a lt as its third process so create it in so rce mode .

Step ') Fow edit this wsdl in so rce mode

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 4

Step ', Edit PortT*pe as shown below + Gwsdl+!a lt messageHCInvalidSt dent9ar%s'a lt9essageC nameHCErrorC>?

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /.

Step '- Edit 9essage T*pe -e!inition as shown below + Gwsdl+message nameHCInvalidSt dent9ar%s'a lt9essageC? Gwsdl+part nameHCInvalidSt dent9ar%s'a ltC elementHCerr+ErrorC>?

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page //

Step'.+ Import Error.)sd !rom oramds , open reso rce palette ---? S"#-9-S--?dev mds conn --?apps---?Error.)sd to get schema location o! error.)sd clic% once on it = se ctrl Ishi!tIc then paste inside schemalocation , delete all be!ore apps = write oramds+> be!ore apps . then cop* namespace !rom error.)sd = paste here inside namespace .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /1

Step '/+ 2egister namespace o! Error.)sd with pre!i) CerrC .

)mlns+errHChttp+>>www.bispsol tions.com>training>soa>schema>St dentC

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /5

Step '0 #s completed editing wsdl clic% on design mode = observe !a lt process

E)plore !a lt on clic%ing JIK sign = see that it contains InvalidSt dent9ar%s !a lt9essage associated with its part .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /:

Step '9 &lic% on Imports = chec% imported )sd

Step (1

clic% on Schema mode to see incl ded )sd .

Step (' "pen ProcessSt dentProcess.bpel = Edit Throw activit* again www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page /A

Step (( Fow observe that this time wsdl contains Invalid st dent9ar%s!a lt9essage clic% on it = hit o% .

Step () &reate ,ariable as shown below = clic% "0

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /B

Step (,

&hec% detail = hit "0 .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /D

Step (- &hec% variables b* clic%ing on

icon .

Step (. &hec% that all LFame is associated with its pre!i) , so observe here that InvalidSt dent9ar%s'a lt,ar does not contains its pre!i) so clic% on LFame = edit variable , it sho ld be message t*pe , clic% on Browse

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /E

Step (/ &lic% on that InvalidSt dent9ar%s'a lt9essage = clic% "0

Step (0 #gain &hec% variables b* clic%ing on

icon .

Step (9 &lic% on assign c stom !a lt = start assigning !a lt data

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page /4

Step )1+ To assign !a lt&ode clic% on e)pression -rag = -rop on !a lt&ode as shown below

Step)'+ $rite E)pression i.e !a lt code as M'9$-..1M

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1.

Step )(+ Similarl* severit* as /

Step )) Select -ate ' nctions = nder it select c rrent-date-Time then insert intoE)pressionthen clic% o%

Step ), Similarl* -etail as MIF,#@I- 9#20S SE@@E&TI"FM

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1/

Step )-+ 'or &ompositeFame clic% #dvanced ! nctions ----? get&ompositenFame then

Step ). 'or &omponentFame clic% #dvanced ! nctions ----? get&omponentFame then insert into E)pression

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 11

Step )/ 'or &ompositeInstanceId clic% #dvanced ! nctions ----? get&ompositeInstanceId then insert into E)pression

Step )0 "bserve all assigned val es

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 15

Step )9 -rag = drop 2epl* #ctivit* = clic% twice on it to edit repl* as shown below+

Step ,1 Edit 2epl* as shown below + www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page 1:

Step ,' &lic% on compile icon to compile the bpel process

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1A

Step ,( B ild s ccess! l

Step ,) -eplo* pro6ect b* clic%ing ProcessSt dent to devsoa www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page 1B

Fote+ Be!ore -eplo*ment Start $eblogic #dmin Server as disc ssed in m* previo s doc ment "racle Soa Part I, -oc.

Step ,,+ &lic% on Browser icon shown below+

Step ,-+ Start *o r enterprise manager b* writing rl http+ >>localhost+D../>em>

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1D

Fote + Here localhost is application server = D../ is a port in which enterprise manager is r nning. Step ,. @ogin sing credentials Nser Fame +weblogic Password + welcome/ clic% on login

Step ,/ $e have s ccess! ll* login inside Enterprise manager //g 7'armOdevOsoa8 we can clearl* observe here that admin server is p = all deplo*ment stat s is also p it means that o r admin server is r nning .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 1E

Fow In le!t pane o! window nder 'armOdevOsoa clic% on S"# radio b tton now again e)pand = nder de!a lt we can easil* see all the deplo*ed pro6ects. &lic% on Processst dent twice

Step ,0 &lic% on TEST = create instance

Step ,9 E)plore pa*load = select tree view

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 14

Step -1 'ill all blan% spaces as shown below

Step -' &lic% on Test $eb Service

#nd get 2esponse shown below+ Step -( Fow since inp t lang/ mar%s is /A. = so it displa*s c stom error or InvalidSt dent9ar%s Error as shown below .&lic% on close .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5.

Step -) + Parse wsdl = again tr* with these inp ts shown below +

&lic% on Test $eb Service Step-, "bserve response witho t error beca se this time all inp t lang mar%s are between . = /...

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5/

Step -- #ll instances are completed = instance 51...1 is completed with c stom !a lt = instance 51...5 is completed witho t errors .

F"TE+ Fow how we catch these !a lts thro gh invo%ing service , ne)t steps are concentrated on this P estion in which calling service is TopperSt dent Service . Step -.+ "pen Topper St dent Process . bpel clic% on #dd catch all activit* shown below

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 51

F"TE+ &atch activit* can catch onl* s*stem !a lts where as catch all activit* catches b siness !a lt Step -/+ &lic% on so rce mode .&op* all activies o! catch = paste inside catch all bloc% in sorce mode

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 55

Step -0 &op* catch as shown below

Step -9 Paste inside &atch all activit* www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page 5:

Step .1 &hange into design mode = save b* clic%ing save icon

Step .'

-rag = drop Scope #ctivit* as shown below+ www.bisptrainigs.com www.h*periong r .com Page 5A

www.bispsol tions.com

Scope Acti+it#

This activit* consists o! a collection o! activities that can have their own local variables , !a lt handlers, compensation handlers and so on . # scope activit* is analogo s to a bloc% Q R in programming lang age .Each scope has a primar* activit* can be comple) str ct red activit* that, with man* nested activities within it to arbitrar* depth. The scope is shared b* all the nested activities . Step .(+ Fow drag = drop all components inside scope activit* as shown below +

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5B

2O34 Since we have made changes in ProcessSt dentProcess.wsdl in ProcessSt dentPro6ect hence also need changes in imported ProcessSt dentProcess.wsdl in TopperSt dent Pro6ect so that catch activit* catch this c stom !a lt as remote !a lt in TopperSt dentPro6ect . Step .) "pen ProcessSt dentProcess.wsdl in TopperSt dentPro6ect b* clic%ing on it = observe in design mode that it does not have !a lt process .

Aim + " r aim is to cop* the reP ired content !rom M9 wsdl M to MF wsdlM $here 9H MProcessSt dentProcess.wsdlM in ProcessSt dent Pro6ect = FH M MProcessSt dentProcess.wsdlM in TopperSt dentPro6ect

Step .,+ &op* imported Error.)sd !rom 9.wsdl as shown below+

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5D

Step .-

Paste imported Error.)sd to F.wsdl as shown below+

Step .. &op* registered namespace !rom 9.wsdl as shown below+

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 5E

Step ./ Paste registered namespace !rom F.wsdl as shown below+

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page 54

Step .0 &op* 9essageT*pe !rom 9.wsdl as shown below+

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :.

Step .9 Paste 9essageT*pe to F.wsdl as shown below+

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :/

Step /1 &op* PortT*pe !rom 9.wsdl as shown below+

Step /'+ Paste PortT*pe to F.wsdl = save all b* clic%ing save icon

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :1

Step /( &lic% F.wsdl in design mode = observe that now created 'a lt as process .

Step /) #dd Terminate activit* to terminate catch process as shown below = save all . www.bispsol tions.com www.bisptrainigs.com www.h*periong r .com Page :5

Step /, &lic% on compile icon to compile the bpel process

Step /-+ &ompilation s ccess! l with o errors = o warnings .

Step /. + -eplo* pro6ect b* clic%ing TopperSt dentPro6ect.

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page ::

-eplo*ment 'inished Fote+ Be!ore -eplo*ment Start $eblogic #dmin Server as disc ssed in m* previo s doc ment "racle Soa Part I, -oc Step // + &lic% on Browser icon shown below+

Step /0+ Start *o r enterprise manager b* writing rl http+ >>localhost+D../>em>

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :A

Fote + Here localhost is application server = D../ is a port in which enterprise manager is r nning.

Step /9 @ogin sing credentials Nser Fame +weblogic Password + welcome/ clic% on login

Step 01 $e have s ccess! ll* login inside Enterprise manager //g 7'armOdevOsoa8 we can clearl* observe here that admin server is p = all deplo*ment stat s is also p it means that o r admin server is r nning . Fow In le!t pane o! window nder 'armOdevOsoa clic% on S"# radio b tton now again e)pand = nder de!a lt we can easil* see all the deplo*ed pro6ects. &lic% twice on TopperSt dentPro6ect .

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :B

Step 0'+ &lic% on TEST = &reate instance

Step 0(+ Inp t St dent arra* si<e H1

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :D

Step 0) Scroll down page = Provide reP ired inp t o! a st dents

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :E

Step 0, &lic% on Test $eb Service

#nd get 2esponse shown below+ Step 0- Fow we can see that catch activit* catch the !a lt = replied to the client as 'a ltdata 2esponse b t here catch activit* cached it as remote !a lt thats wh* !a lt code is '9$-.../ = detail o! c stom !a lt is displa*ed inside -etail as '9$-..1 , G-etail?Invalid mar%s G>-etail? as shown below +

Step 0. &hec% !low trace

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page :4

'ig 7/8

'ig718

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page A.

'ig 758

'ig 7:8

Step 0/ "bserve instances = instance state is terminated beca se o! terminate activit* now !inall* clic% on sh tdown tab

Step 00 Sh t down con!irmation ,&lic% *es

Step 09 S ccess! ll* sh t down the composite

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page A/

www.bispsol tions.com

www.bisptrainigs.com

www.h*periong r .com

Page A1

You might also like