def headercontent(self, method):
n = <NUM_LIT:0><EOL>content = []<EOL>wsse = self.options().wsse<EOL>if wsse is not None:<EOL><INDENT>content.append(wsse.xml())<EOL><DEDENT>headers = self.options().soapheaders<EOL>if not isinstance(headers, (tuple,list,dict)):<EOL><INDENT>headers = (headers,)<EOL><DEDENT>if len(headers) == <NUM_LIT:0>:<EOL><INDENT>return content<EOL><DEDENT>pts = self.headpart_types(method)<EOL>if isinstance(headers, (tuple,list)):<EOL><INDENT>for header in headers:<EOL><INDENT>if isinstance(header, Element):<EOL><INDENT>content.append(deepcopy(header))<EOL>continue<EOL><DEDENT>if len(pts) == n: break<EOL>h = self.mkheader(method, pts[n], header)<EOL>ns = pts[n][<NUM_LIT:1>].namespace('<STR_LIT>')<EOL>h.setPrefix(ns[<NUM_LIT:0>], ns[<NUM_LIT:1>])<EOL>content.append(h)<EOL>n += <NUM_LIT:1><EOL><DEDENT><DEDENT>else:<EOL><INDENT>for pt in pts:<EOL><INDENT>header = headers.get(pt[<NUM_LIT:0>])<EOL>if header is None:<EOL><INDENT>continue<EOL><DEDENT>h = self.mkheader(method, pt, header)<EOL>ns = pt[<NUM_LIT:1>].namespace('<STR_LIT>')<EOL>h.setPrefix(ns[<NUM_LIT:0>], ns[<NUM_LIT:1>])<EOL>content.append(h)<EOL><DEDENT><DEDENT>return content<EOL>
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},..]