Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
user19
Contributor

Protect SOAP web services with HTTP Basic Authentication in talend studio

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.

Labels (2)
1 Reply
Anonymous
Not applicable

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

0695b00000LvXg3AAF.pngIn 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.