def bodypart_types(self, method, input=True):
result = []<EOL>if input:<EOL><INDENT>parts = method.soap.input.body.parts<EOL><DEDENT>else:<EOL><INDENT>parts = method.soap.output.body.parts<EOL><DEDENT>for p in parts:<EOL><INDENT>if p.element is not None:<EOL><INDENT>query = ElementQuery(p.element)<EOL><DEDENT>else:<EOL><INDENT>query = TypeQuery(p.type)<EOL><DEDENT>pt = query.execute(self.schema())<EOL>if pt is None:<EOL><INDENT>raise TypeNotFound(query.ref)<EOL><DEDENT>if p.type is not None:<EOL><INDENT>pt = PartElement(p.name, pt)<EOL><DEDENT>if input:<EOL><INDENT>if pt.name is None:<EOL><INDENT>result.append((p.name, pt))<EOL><DEDENT>else:<EOL><INDENT>result.append((pt.name, pt))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result.append(pt)<EOL><DEDENT><DEDENT>return result<EOL>
Get a list of I{parameter definitions} (pdef) defined for the specified method.
Each I{pdef} is a tuple (I{name}, L{xsd.sxbase.SchemaObject})
@param method: A service method.
@type method: I{service.Method}
@param input: Defines input/output message.
@type input: boolean
@return:  A list of parameter definitions
@rtype: [I{pdef},]