Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I'm new in TOS.
I created service which has few fields in request.
I managed to insert these fields to database using tXMLMap and tDBOutput.
Now what I want to do is return soap response when there is no error during inserting to database otherwise return fault message.
Which component should I use?
I cannot use triggers from tDBOutput to tESBProviderResponse
Hi,
Could you please try this method? You can create a message using tRowgenerator and convert it to appropriate format before sending as either response or fault.
Please note that the number of records in tRowgenerator must be 1 instead of default value of 100.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi,
Could you please try this method? You can create a message using tRowgenerator and convert it to appropriate format before sending as either response or fault.
Please note that the number of records in tRowgenerator must be 1 instead of default value of 100.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Thanks for replay, but...
While inserting into database I get error "Violation of PRIMARY KEY constraint" and it's not recognized as SubjobError
Problem was in Die on error in DBOutput.
Thank you
I still have problem to get response or fault.
In case of database error, flow goes to tESBFaultProvider but I don't get any message in SoapUI as response. And I get error:
"Exception in component tESBProviderFault_1 (AddFileTaskLogging)
java.lang.RuntimeException: Send Response failed! Response already sent with current request."
Hi,
It could be because your trowgnerator may have multiple records getting generated. Could you please verify whether its having default value of 100?
Please also check the below link which has been solved for similar issue.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
In tRowGenerator number of rows is set to 1.
I also changed All in one to true but I don't think I does make sens.
I return static response "Ok" or "Error".
One thing I've noticed is that I get sql exception immediately and after a while (probably timeout ?) I get
java.lang.RuntimeException: Send Response failed! Response already sent with current request.
Second case is more confusing:
In case of proper insert to database, flow goes to DBOutput and hang for a while, then I get Timeout exception, and flow goes to onSubjibError