Upload
prathap-kumar
View
42
Download
0
Tags:
Embed Size (px)
Citation preview
Exception Handling for remote fault:
For handling remote fault first we need one service..
So I am creating AdditionNumber service for invoking.
SynchAdditionNumbers:
Deploy the application
After testing the above application it will generate the endpoint url and wsdl…we need wsdl for next
process …so please copy the wsdl
For example
Wsdl address:
http://localhost:8001/soa-
infra/services/default/SynchAdditionNumbers/sunchadditionnumbers_client_ep?WSDL
step2)
I am developing new project:
Now take a webservice component into composite.xml and configure with addition wsdl. After
configuring the webservice component wire the BPEL to webservice component
Now go to BEPL and drag a scope activity between receiveInput and replyOutput activities and name it
as scope_add.
Now your BPEL should look like below:
Now expand scope add invoke,transformation,assign activities to complete the functionality of invoking
the addition service.
Now your BPEL should look like below:
Make a wire to invoke to ur service reference…In mean while of wiring create two variables…
After using transformation activity assign input variable values to invoke_1_process_inputvariable….
Now make , deploy and test the application from em console.
Now you will be getting proper output.
Now let us un deploy the SynchAdditionNumbers service to raise the remoteFault.
Undeployment process:
In em console right click on the service /SOA Deployment/Undeploy as shown below:
Now go back to ExceptionHandling demoRemotefault service and retest the service. This time you will
be getting fault as shown below:
Close the message.
Now go and examine the instance execution details.
Go to ExceptionhandlingdemoRemotefaultProcessor Bpel and expand the Payload after the invoke
activity as shown below:
The fault occurred is remoteFault.
Now go back to jdeveloper to add fault handling functionality for remoteFault.
Select the scope_add and click on add catch branch as shown below:
This will adds the catch branch as shown below:
Now we have to configure it to handle remoteFault. To do this double click on the catch branch just now
added.
This will launches the catch configuration window as shown below:
Now click on + symbol to create the fault variable. The variable will be created automatically .The
variable will holds the faults details.
Now click on Ok.
Now your BPEL will look like below:
Now expand the remoteFault catch branch and drag and assign activity into the branch and provide
some message “remoteFault is caught” to output variable.
Now your catch branch will look like below:
Now make,deploy and test the application.
Now you will be getting “remoteFault is caught” as output.