code: def bodypart_types(self, method, input=True):
          
          result = []
          if input:
              parts = method.soap.input.body.parts
          else:
              parts = method.soap.output.body.parts
          for p in parts:
              if p.element is not None:
                  query = ElementQuery(p.element)
              else:
                  query = TypeQuery(p.type)
              pt = query.execute(self.schema())
              if pt is None:
                  raise TypeNotFound(query.ref)
              if p.type is not None:
                  pt = PartElement(p.name, pt)
              if input:
                  if pt.name is None:
                      result.append((p.name, pt))
                  else:
                      result.append((pt.name, pt))
              else:
                  result.append(pt)
          return result
docs: 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},]