'Get the content for the soap I{Header} node.
@param method: A service method.
@type method: I{service.Method}
@return: The xml content for the <body/>
@rtype: [L{Element},..]'

def headercontent(self, method):

    n = 0
    content = []
    wsse = self.options().wsse
    if (wsse is not None):
        content.append(wsse.xml())
    headers = self.options().soapheaders
    if (not isinstance(headers, (tuple, list, dict))):
        headers = (headers,)
    if (len(headers) == 0):
        return content
    pts = self.headpart_types(method)
    if isinstance(headers, (tuple, list)):
        for header in headers:
            if isinstance(header, Element):
                content.append(deepcopy(header))
                continue
            if (len(pts) == n):
                break
            h = self.mkheader(method, pts[n], header)
            ns = pts[n][1].namespace('ns0')
            h.setPrefix(ns[0], ns[1])
            content.append(h)
            n += 1
    else:
        for pt in pts:
            header = headers.get(pt[0])
            if (header is None):
                continue
            h = self.mkheader(method, pt, header)
            ns = pt[1].namespace('ns0')
            h.setPrefix(ns[0], ns[1])
            content.append(h)
    return content
