[SWS-710] Make it possible to retrieve SoapHeaderElement from SoapHeader by QName Created: 23/Jun/11  Updated: 04/May/12  Resolved: 17/Oct/11

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 2.0.2
Fix Version/s: 2.0.3

Type: Improvement Priority: Minor
Reporter: Chris Pilsworth Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: soap, soapheader, soapheaderelement
Remaining Estimate: Not Specified
Time Spent: 20m
Original Estimate: Not Specified


I would like to retrieve a SoapHeaderElement from a SoapHeader using it's QName. At the moment, it seems the api only allows for this to be retrieved by through iteration using the SoapHeader.examine*() methods.

Currently, getting an individual element looks something like this:

Iterator<SoapHeaderElement> headerElements = soapHeader.examineAllHeaderElements();
while(headerElements.hasNext()) {
  SoapHeaderElement elem = headerElements.next();
  if (QNAME_MESSAGE_ID.equals(elem.getName())) {
    return elem.getText();

It would be good to be able to access header elements directly, like so:

return soapHeader.getHeaderElement(qName);

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Wed Jul 08 01:30:22 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.