Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Return soap response or fault after insert to database

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

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

 

0683p000009M7Ow.png

 

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

View solution in original post

7 Replies
Anonymous
Not applicable
Author

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.

 

0683p000009M7Ow.png

 

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

Anonymous
Not applicable
Author

Thanks for replay, but...
While inserting into database I get error "Violation of PRIMARY KEY constraint" and it's not recognized as SubjobError

Anonymous
Not applicable
Author

Problem was in Die on error in DBOutput.
Thank you

Anonymous
Not applicable
Author

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."

0683p000009M7oX.png

 

Anonymous
Not applicable
Author

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.

 

https://community.talend.com/t5/Design-and-Development/Send-Response-failed-Response-already-sent-wi...

 

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Everything works good on runtime.
Thanks for help