One Star

How to return fault/error in SOAP output

Hi
Following ESB job is running successfully for valid inputs. I would like return fault code and fault message if the input is wrong. What is the best way to handle this scenario. Thanks a lot for your time.

Thanks
Kranthi
6 REPLIES
Employee

Re: How to return fault/error in SOAP output

Hi Kranthi,
Just put a tFilter or similar component and use tESBFault in case of empty/faulty data.
Renat
One Star

Re: How to return fault/error in SOAP output

Hi ,
Thanks for the quick reply. I modified the job as per your suggestion. But the problem is tOracleInput_1 is returning 0 rows. We do not have any option to identify null rows using tFilterRow_1. Not sure which component I have to use.
My requirement is if tOracleInput_1 is not returning any rows it has return the fault code.


Thanks
Kranthi
One Star

Re: How to return fault/error in SOAP output

I am stuck implementing Web services . Can someone help me please ?
Employee

Re: How to return fault/error in SOAP output

Hello Kranthi,
I'm checked with our component team and their response is that we are not able to support that kind of check with existing component flow model. Please raise an issue on the http://www.talendforge.org.
Renat
One Star

Re: How to return fault/error in SOAP output

Thanks for the quick turn around. Do you have any examples to handle exceptions (like SQL No data found or due to some validations ) for ESB jobs ?
Employee

Re: How to return fault/error in SOAP output

I think in your case there is a difference wherever you want to send a SOAP fault or empty result in case of nothing found. Sending SOAP faults is simple, just use tESBFault component.
Renat