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

tESBConsumer1 HTTP Headers in globalMap: how to use them in tESBConsumer2?

Hello,

 

A SOAP Webservice I want to consume with a Talend job requires cookie storage between operations. A first operation using tESBConsumer_1 gets the cookie in the HTTP Headers ("Set-Cookie") of the response. I read in the community discussions that the headers are stored in the globalMap, and I verified that using Java debugging.

 

But how do I use the "tESBConsumer_1_HTTP_HEADERS" variable within the global map as a custom HTTP header in a next ESBConsumer (tESBConsumer_2)?

 

Unfortunately, I lack the Java coding background to write the code for a tJava component. My tJava component currently contains the single line "((java.util.Map<String,java.util.List>)globalMap.get("tESBConsumer_1_HTTP_HEADERS")).get("Set-Cookie").get(1)", which I found in a related topic. But it yields some java errors. 

 

So, (1) What needs to be in my tJava component? (2) How does my tJava component need to be connected to tESBConsumer_1 (3) How do I pass on the "Set-Cookie" value to the custom header of my next tESBConsumer (tESBConsumer_2)?

 

I appreciate your input! 

 

Jesper

 

 

 

Labels (4)
1 Reply
Anonymous
Not applicable
Author

Hello,

When you type in tESBConsumer and press STRG+Space for autocomplete , it should be autocompletion to
{code:java}
((java.util.Map<String,java.util.List<String>>)globalMap.get("tESBConsumer_1_HTTP_HEADERS"));{code}

Here is a related topic:https://community.talend.com/t5/Design-and-Development/tSOAP-access-the-response-header/m-p/133677.

Hope it will be helpful.

Best regards

Sabrina