One Star

[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
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] tESBProviderRequest getting the soap header

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
5 REPLIES
Community Manager

Re: [resolved] tESBProviderRequest getting the soap header

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] tESBProviderRequest getting the soap header

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
One Star

Re: [resolved] tESBProviderRequest getting the soap header

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
Community Manager

Re: [resolved] tESBProviderRequest getting the soap header

Cool, glad to see you get it to work and thanks for your feedback.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: [resolved] tESBProviderRequest getting the soap header

So finally there is way about how to extract SOAP headers.