In one my wsdls I have:
<part name="body" element="soap-env:Fault"/>
<fault name="LowLevelServiceError" message="tns:LowLevelServiceFault"/>
After invoke I've got fault message so I would like to catch fault using:
<bpel:catch faultName="tns:LowLevelServiceError" faultVariable="LowLevelServiceFaultVariable" faultElement="soap-env:Fault">
but it doesn't work.
According to specification is should work (Web Services Business Process Execution Language Version 2.0 OASIS Standard11 April 2007, paragraph 12.5. Fault Handlers):
In the case of faults thrown with associated data the fault MUST be caught as follows:
1. If there is a <catch> construct with a matching faultName value that has a faultVariable whose type matches the type of the runtime fault data then the fault is passed to the identified <catch> construct (see the matching criteria definition below).
2. Otherwise if the fault data is a WSDL message type where the message contains a single part defined by an element and there exists a <catch> construct with a matching faultName value that has a faultVariable whose associated faultElement's QName matches the QName of the runtime element data of the single WSDL message part, then the fault is passed to the identified <catch> construct with the faultVariable initialized to the value in the single part's element (see the matching criteria definition below).
so according to the specification LowLevelServiceFaultVariable should be initialized using "body" part.
Fortunately such catch works:
<bpel:catch faultName="tns:LowLevelServiceError" faultVariable="LowLevelServiceFaultVariable" faultMessageType="tns:LowLevelServiceFault">
|Field||Original Value||New Value|
|Fix Version/s||1.2 [ 12312664 ]|
|Resolution||Won't Fix [ 2 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|9d 23h 21m||1||Mateusz Nowakowski||18/Apr/08 09:14|