Example usage for javax.xml.soap SOAPHeaderElement getNodeName

List of usage examples for javax.xml.soap SOAPHeaderElement getNodeName

Introduction

In this page you can find the example usage for javax.xml.soap SOAPHeaderElement getNodeName.

Prototype

public String getNodeName();

Source Link

Document

The name of this node, depending on its type; see the table above.

Usage

From source file:com.centurylink.mdw.hub.servlet.SoapServlet.java

protected Map<String, String> addSoapMetaInfo(Map<String, String> metaInfo, SOAPMessage soapMessage)
        throws SOAPException {
    SOAPHeader soapHeader = soapMessage.getSOAPHeader();
    if (soapHeader == null) {
        return metaInfo;
    } else {// ww  w.  j a  v  a 2  s.c o  m
        Map<String, String> newMetaInfo = new HashMap<String, String>();
        newMetaInfo.putAll(metaInfo);
        Iterator<?> iter = soapHeader.examineAllHeaderElements();
        while (iter.hasNext()) {
            SOAPHeaderElement headerElem = (SOAPHeaderElement) iter.next();
            if (!Listener.AUTHENTICATED_USER_HEADER.equals(headerElem.getNodeName()))
                newMetaInfo.put(headerElem.getNodeName(), headerElem.getTextContent());
        }
        return newMetaInfo;
    }
}