Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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