[resolved] How to access tESBProviderRequest payload in tAsserCatcher?

One Star

[resolved] How to access tESBProviderRequest payload in tAsserCatcher?

Hello,
in a service job processes soap request. The processing throws exception. We catch this exception in a tAssertCatcher and send fault using tXMLMap and tESBProviderFault.
How to access the request payload in error handling? I need to copy some metadata from request to the fault.
Thank you, Viktor

Accepted Solutions
Community Manager

Re: [resolved] How to access tESBProviderRequest payload in tAsserCatcher?

Hi
You can store the payload to a global variable on tJavaRow before processing, and then you are able to get it later on other component, for example:
tESBProviderRequest--main--tJavaRow--main--tXMLMap.....
     
tAsserCatcher----tMap--->
on tJavaRow:
output_row.payload = input_row.payload;
globalMap.put("key",input_row.payload);

on tMap, add the new column with Document type in the output table, and set its expression as:
(routines.system.Document)globalMap.get("key")

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] How to access tESBProviderRequest payload in tAsserCatcher?

Hi
You can store the payload to a global variable on tJavaRow before processing, and then you are able to get it later on other component, for example:
tESBProviderRequest--main--tJavaRow--main--tXMLMap.....
     
tAsserCatcher----tMap--->
on tJavaRow:
output_row.payload = input_row.payload;
globalMap.put("key",input_row.payload);

on tMap, add the new column with Document type in the output table, and set its expression as:
(routines.system.Document)globalMap.get("key")

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to access tESBProviderRequest payload in tAsserCatcher?

Thank you Shong Smiley Happy