if (unboundHeaders != null)
{
Iterator it = unboundHeaders.values().iterator();
while (it.hasNext())
{
UnboundHeader unboundHeader = (UnboundHeader)it.next();
if (unboundHeader.getMode() != ParameterMode.OUT)
{
QName xmlName = unboundHeader.getXmlName();
Object value = unboundHeader.getHeaderValue();
xmlName = namespaceRegistry.registerQName(xmlName);
Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());
log.debug("Add unboundHeader element: " + soapName);
SOAPContentElement contentElement = new SOAPHeaderElementImpl(soapName);
contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
if (soapHeader == null)
soapHeader = soapEnvelope.addHeader();
soapHeader.addChildElement(contentElement);