Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to send SOAP request with basic Authentication and I want to extract authentication header inside my job. can any one please guide how to do it? I searched around and found this link http://janbernhardt.blogspot.com/2017/03/basic-authentication-with-talend-esb.html
but I dont want to implement in this way I just want to do basic Authentication but not changing wsdl but with talend studio components.
You can set the authentication by looking at the "Use Authentication" section of this document.....
https://help.talend.com/r/en-US/7.3/esb-soap/tesbconsumer
To retrieve the header information, you can use a globalMap variable found in the Outline View.....
In the image you can see I am highlighting the HTTP Headers variable of the tESBConsumer component that is in my job. If I open a tJava component and drag this variable to it, I will see code like this.....
((java.util.Map<String,java.util.List<String>>)globalMap.get("tESBConsumer_1_HEADERS"))
Then it is just a case of iterating over the Map keys to find a key that suits the header we want to look at, then using that key to extract the header and have a look at it. This does require Java, but it isn't terribly difficult.