public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris) throws SOAPException
{
if (supportedSoapUris == null)
throw new SOAPException(BundleUtils.getMessage(bundle, "LIST_OF_SUPPORTED_URIS_CANNOT_BE_NULL"));
if (!supportedSoapUris.hasNext())
throw new SOAPException(BundleUtils.getMessage(bundle, "LIST_OF_SUPPORTED_URIS_CANNOT_BE_EMPTY"));
final String namespaceURI = getNamespaceURI();
final String prefix = getPrefix();
QName upgradeName = new QName(namespaceURI, "Upgrade", prefix);
SOAPHeaderElement upgradeElement = addHeaderElement(upgradeName);
while (supportedSoapUris.hasNext())
{
String soapUri = (String)supportedSoapUris.next();
SOAPElement supportedElement = upgradeElement.addChildElement("SupportedEnvelope", prefix, namespaceURI);
SAAJUtils.setQualifiedAttributeValue(supportedElement, "qname", new QName(soapUri, "Envelope"));
}
return upgradeElement;
}