SOAPHeaderBlock headerBlock = null;
if (this.element.getOMFactory() instanceof SOAP11Factory) {
headerBlock = new SOAP11HeaderBlockImpl(localName, ns, omSOAPHeader,
(SOAPFactory)this.element.getOMFactory());
} else {
headerBlock = new SOAP12HeaderBlockImpl(localName, ns, omSOAPHeader,
(SOAPFactory)this.element.getOMFactory());
}
SOAPHeaderElementImpl soapHeaderElement = new SOAPHeaderElementImpl(headerBlock);
element.setUserData(SAAJ_NODE, this, null);
soapHeaderElement.element.setUserData(SAAJ_NODE, soapHeaderElement, null);