String supported = (String)iterator.next();
OMNamespace namespace = new NamespaceImpl(supported, prefix + index);
if (this.element.getOMFactory() instanceof SOAP11Factory) {
SOAP11HeaderBlockImpl supportedEnvelop =
new SOAP11HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
namespace,
(SOAPFactory)this.element.getOMFactory());
supportedEnvelop.addAttribute(Constants.ATTR_QNAME, prefix + index + ":"
+ Constants.ELEM_ENVELOPE, null);
upgrade.addChild(supportedEnvelop);
} else {
SOAP12HeaderBlockImpl supportedEnvelop =
new SOAP12HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
namespace,
(SOAPFactory)this.element.getOMFactory());
supportedEnvelop.addAttribute(Constants.ATTR_QNAME, prefix + index + ":"
+ Constants.ELEM_ENVELOPE, null);
upgrade.addChild(supportedEnvelop);
}
}
SOAPHeaderElementImpl soapHeaderElementImpl = new SOAPHeaderElementImpl(upgrade);