
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HTTP Headers is not taken into consideration in Into Request Generation by tESBConnsumer
Hello,
I try to send My HTTPHeader "Interops-Infos" via tESBconsumer but this component does not put this header in this request.
I try to do same think like the method described by Talend in the following website but also didn't work : https://help.talend.com/r/jomWd_GKqAmTZviwG_oxHQ/CVO~KLnIdGGSkUWRMNXxZw
This result showed in the following is taking by Hercules Software
The request sended by tESBconsumer is:
And I wait request Like this :
How Can I send this HTTPHeader in tESBconsumer?
thanks for your help in advance
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@fawaz hadadeh I just noticed, when you set the XML in the Headers section on the Advanced tab, you have the "Propagated" tickbox ticked. Can you untick that and try it? I think that might be an issue as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @fawaz hadadeh you appear to be trying to send an XML string as a header value. Headers are usually configured as key/value pairs. Can you give us a bit more information as to what your API requires?
Also, the instructions you are following are showing supplying Headers via the input row. They are supplied alongside the Payload as a Headers Document. Both these documents are created using tXMLMap components.
Can you take a few screenshots of what you are doing in your job and we can likely figure out what is going wrong from there. The API information would be useful as well. It is really tough to solve issues with web services unless you have all of the details.
Regards
Richard

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Richard Hall ,
thanks very much for your response.
In resume, I want to sent the http header "Interops-Infos" via tesbconsumer to identificate SOAP service, i try to send it like Soap Header (I try to send header under the request) like the following example, but did not work in the two cases: https://help.talend.com/r/jomWd_GKqAmTZviwG_oxHQ/CVO~KLnIdGGSkUWRMNXxZw
My purpose is to send HTTP Header for my SOAP services via TESB consumer, but i Don't now if Talend support this using TESBconsumer
Note : Using SOAPUI is working very good, i have the expected results
But talend does not work , Talend response in the two cases is this :
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @fawaz hadadeh,
Looking at your example where you supplied the header as XML via the row, it looks like you named the column incorrectly. In the documentation it says to name the headers column "headers". You appear to have named it "Headers". I know this is only a difference of case, but Talend is a Java tool and Java is case sensitive.
The HTTP Headers section is the wrong place to send SOAP Headers. This is very confusing and I shall be raising this with the documentation team to make the documentation more clear on this.
I have carried out a few tests to ensure that this is the cause. I have written a SOAP service in Talend and tried supplying SOAP headers via the HTTP Headers section. This supplies only HTTP Headers. I also changed the column name from "Headers" to "headers" (and also tried several other possible names). It ONLY works when the column is called "headers".
Give this a try and let me know what you find. But to be clear, these headers MUST be SOAP Headers and not HTTP Headers for this way to work.
Regards
Richard

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Richard Hall ,
Thanks again for your response.
With SOAP Headers, the results still no good with the column named "headers" or "Headers"
I need to know please how I can send HTTP Headers like the component trestClient (by example trestclient provide the send of HTTP Headersbut tesbConsumer doesn't support this maybe if I add this headers parameters in Advanced settings).
I think there is an error in tesbconsumer from Talend, that need to change from your part the code of this component to support the send of httpHeader.
I hope that we can organize an appointment of 10 min to resolve this problem.
My email is : xxxxxxx@xxxxx.com
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so you are definitely trying to send a HTTP header which is a String representation of XML? If that is the case, can you send me a copy of the XML (remove any private data or replace with x's or random numbers)? I suspect I may know what might be the issue here, but I need to test it. Also, can you send me the API info for the web service so that I can see what is going on there?
My thinking is that the String representation of the XML may be affected by special characters in Java. These can potentially be escaped if that is the cause.
I removed your email address from your post so that you do not get spammed by bots that search the net for email addresses 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@fawaz hadadeh I just noticed, when you set the XML in the Headers section on the Advanced tab, you have the "Propagated" tickbox ticked. Can you untick that and try it? I think that might be an issue as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Richard Hall ,
The API is : "http://192.168.2.45:8081/CPF/Public/CPF/DOSSIER/Facade/V1"
The Http Header is :
"Interops-Infos" = "<InteropsInfos><LocalSubjectName>CPF-TEST</LocalSubjectName><SubjectId>urn:interops:XXXXXXXX:idp</SubjectId><MethodAuthn>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</MethodAuthn><AuthenticationDate>XXXXXXXX</AuthenticationDate><Roles><Role>XXXXX</Role></Roles></InteropsInfos>"
But I have the same result if by example I take "Interops-Infos" = "ToTo", tesbconsumer doesn't take in consideration on his request all the value defined in Header in advanced settings
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Richard Hall ,
I try to do that but also doesn't working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @fawaz hadadeh,
Does the unedited XML have any backslashes (\) or double quotes in the fields you have removed? The reason I ask is that I cannot understand why none of my suggestions have worked. I have tested each of them to prove that the data is getting sent as it should be. If the XML contains characters that break a Java String somehow, this could be a cause. Passing this in the HTTP Headers section should be working.
Here is how I have tested this. I built a SOAP service with Talend that looks like this....
It's very basic and its only job is to report on headers sent to it. Two types of headers, SOAP and HTTP. The code in the tJavaFlex (Main Code section) is as below.....
//Show HTTP headers
java.util.Map<String,java.util.List<String>> heads = ((java.util.Map<String,java.util.List<String>>)globalMap.get("tESBProviderRequest_1_HEADERS_HTTP"));
java.util.Iterator<String> it = heads.keySet().iterator();
while(it.hasNext()){
String key = it.next();
System.out.println(key+" "+heads.get(key));
}
//Show SOAP Header keys
java.util.Collection<org.apache.cxf.headers.Header> soapheads = ((java.util.Collection<org.apache.cxf.headers.Header>)globalMap.get("tESBProviderRequest_1_HEADERS_SOAP"));
java.util.Iterator<org.apache.cxf.headers.Header> it2 = soapheads.iterator();
while(it2.hasNext()){
org.apache.cxf.headers.Header htmp = it2.next();
System.out.println(htmp.getName());
}
I run that and then I send varying configurations of data to it using the tESBConsumer component. An example of the that job can be seen below.....
The last time I ran this, I had the tESBConsumer configured as below (using the XML you sent me).....
When I ran the job (which sends data to my very basic SOAP service), I get the following back from the tJavaFlex....
Accept [*/*]
Cache-Control [no-cache]
connection [keep-alive]
Content-Length [205]
content-type [text/xml; charset=UTF-8]
Host [localhost:8090]
Interops-Infos [<InteropsInfos><LocalSubjectName>CPF-TEST</LocalSubjectName><SubjectId>urn:interops:XXXXXXXX:idp</SubjectId><MethodAuthn>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</MethodAuthn><AuthenticationDate>XXXXXXXX</AuthenticationDate><Roles><Role>XXXXX</Role></Roles></InteropsInfos>]
Pragma [no-cache]
SOAPAction ["http://www.talend.org/service/TestServiceOperation"]
User-Agent [Apache-CXF/3.3.4]
headers
To explain the above, everything above "headers" are HTTP headers sent in key/value pairs. You will see that the "Interops-Infos" key and value is there. The "headers" key is the only SOAP header and I didn't bother to translate the Document into a String, so just showed the key to make sure that it arrived.
I tried this test with the "Propagate" tick box ticked and I didn't see the "Interops-Infos" key and value. It was only passed when this tick box was not ticked.
The only other way I can help now is to see the API documentation. I notice that the API is on a local machine in your network (192.168 indicates it is on an internal network). Is this a product that you are using from a company somewhere and do they have a website with their API documentation? Otherwise, is it an internally developed web service?
The problems with web services usually come from subtle differences between services that people use. You can configure a job to work with web services from one provider that work in a particular way, then move to another provider and you can spend hours trying to nail a simple configuration tweak. Unfortunately it is almost impossible to guess at what might be wrong if you have no access to the service or the documentation.
Maybe try recreating the SOAP service that I have demo'd and see what you experience from testing against that. Any extra information you have about the service you are using I will be more than happy to take a look at.
Regards
Richard
