'Builds a soapheader for the specified I{method} using the header
definition (hdef) and the specified value (object).
@param method: A method name.
@type method: str
@param hdef: A header definition.
@type hdef: tuple: (I{name}, L{xsd.sxbase.SchemaObject})
@param object: The header value.
@type object: any
@return: The parameter fragment.
@rtype: L{Element}'

def mkheader(self, method, hdef, object):

    marshaller = self.marshaller()
    if isinstance(object, (list, tuple)):
        tags = []
        for item in object:
            tags.append(self.mkheader(method, hdef, item))
        return tags
    content = Content(tag=hdef[0], value=object, type=hdef[1])
    return marshaller.process(content)
