[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 Sun Dec 15 12:55:26 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.