Red Hat Bugzilla – Bug 820031
Exception handling after SyncServiceInvoker fails
Last modified: 2014-01-12 19:20:39 EST
Description of problem:
I have an EBWS based service which is using the SyncServiceInvoker to call a second service. This all works fine but if I throw an exception after the SyncServiceInvoker call the exception is not propagated to the client as a soap fault.
However if I remove the invocation of the SyncServiceInvoker and throw an exception, a soap fault is sent to the client.
I have attached a test project which demonstrates this.
To see the fault just comment out the SyncServiceInvoker call.
Version-Release number of selected component (if applicable):
Use attached example project
Steps to Reproduce:
1. Deploy the attached example project to SOA Platform 5.2.0
2. Use any SOAP Client to send a WS request to the ESB.
3. Observe that the returned response is not a SOAP Fault
Created attachment 583845 [details]
The attached reproducer shows that the caller might or might not see a fault depending on whether or not ServiceInvoker is used in the Action chain.
On the Support case, Jason has suggested this might be related to https://issues.jboss.org/browse/JBESB-3772.
Could we please take a look at this for SOA-P 5.3?
The customer tried the suggestion on issue, JBESB-3772. And found it fixed this problem.
We suggest the change implementer try suggestions there as a starting point.
GSS bumping from 'medium' to 'high'. The customer is expressing interest in the issue, we would really like this one for 5.3.
Not accepted as a blocker for 5.3, but we probably should re-visit this issue later.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Exception handling issues can arise after the SyncServiceInvoker fails. If an exception is thrown after the SyncServiceInvoker call, the error is not sent to the client. This can be resolved by setting a "FaultTo" EPR in a custom composer-class set on the service's FS-Provider.
I confirmed this issue still exists on the 5.3 branch. Could we please have this addressed in the next roll-up patch?
Jason Shepherd <email@example.com> made a comment on jira JBESB-3796
Suggested fix to be implemented on 4.11_CP branch
Created attachment 607702 [details]
Suggested fix for Branch JBESB_4_11_CP
Pending QA Approval
Sato Tadayoshi <firstname.lastname@example.org> made a comment on jira JBESB-3796
I find that rather the root cause should be located in ActionProcessingPipeline. I understand that the core philosophy of ActionProcessingPipeline is use the ReplyTo/FaultTo of the original request message header when it returns the normal response message or the fault message regardless of however these headers are changed during the action processing. At the innermost processPipeline(Message) method, the call info of the original request message is surely cached to 'callDetails' variable, and this cache is consistently refered to for determining the FaultTo EPR in the faultTo method when an exception occurs while processing actions. However, what's not consistent is when the error message is created by invoking Factory.createErrorMessage(...) method, which unfortunatelly refers to the original request message itself instead of the callDetails cache. To make things worse, Factory.createErrorMessage(...) returns the input message rather than a newly created error message if the input message doesn't have ReplyTo/FaultTo in its header, which is the case of this issue. That's why an ESB service doesn't return a SOAP fault but the normal result of SyncServiceInvoker to the client.
Considering that the problem is in this inconsistency of ActionProcessingPipeline and the same issue can occur with any actions which manipulates the request message header to null, I think the correct fix to the issue should be modifying ActionProcessingPipeline and Factory.createErrorMessage(...).
Tadayoshi Sato <email@example.com> updated the status of jira JBESB-3796 to Resolved