Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tESBProviderRequest getting the soap header

Hello,
i created a web service with the TOS for ESB. In that service i defined some elements for the header part of a message. But i've been unable to access these elements with help of the tESBProviderRequest component. In the payload object i have only access to the body part of a message.
Is there any solution to access the header part of s soap message?
Thanks for your help.
Best regards,
Ahti
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hey,
i found the solution. It's possible to get the SOAP header from the gobalMap like:
java.util.Collection<org.apache.cxf.headers.Header> soapHeaders = ((java.util.Collection<org.apache.cxf.headers.Header>) globalMap
.get("tESBProviderRequest_1_HEADERS_SOAP"));
Found it here: https://jira.talendforge.org/browse/DOCT-2363
Ahti

View solution in original post

6 Replies
Anonymous
Not applicable
Author

see jira issue: TESB-10545, this feature have been available since v5.4.1, you can get the http header information by using the global variable defined on tESBProviderRequest component, for example:
((java.util.Map<String,java.util.List<String>>)globalMap.get("tESBProviderRequest_1_HEADERS_HTTP"))
Shong
Anonymous
Not applicable
Author

Hello Shong,
first thanks for your replay! But i think there is same kind of misunderstanding, i want to read content of the SOAP header and not the HTTP header.
Here is an example Soap Message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.talend.org/service/">
<soapenv:Header>
<ser:headPart/>
</soapenv:Header>
<soapenv:Body>
<ser:requestPart/>
</soapenv:Body>
</soapenv:Envelope>
The goal is to get access to the content of the "soapenv:Header" element. From the tESBProviderRequest i get only the content from the "soapenv:Body" element.
Best regards,
Ahti
Anonymous
Not applicable
Author

Hey,
i found the solution. It's possible to get the SOAP header from the gobalMap like:
java.util.Collection<org.apache.cxf.headers.Header> soapHeaders = ((java.util.Collection<org.apache.cxf.headers.Header>) globalMap
.get("tESBProviderRequest_1_HEADERS_SOAP"));
Found it here: https://jira.talendforge.org/browse/DOCT-2363
Ahti
Anonymous
Not applicable
Author

Cool, glad to see you get it to work and thanks for your feedback.
Shong
Anonymous
Not applicable
Author

So finally there is way about how to extract SOAP headers.
Anonymous
Not applicable
Author

Why can you not just add a option to access the SOAP / HTTP header, especially the Set-Cookie field, for tSOAP component? How can i do that myself and make a pull request? Community managers, go go go, guide me and i'll add that support myself!