# File lib/wsdl/soap/definitions.rb, line 80
  def collect_faulttypes
    result = []
    collect_fault_messages.each do |name|
      faultparts = message(name).parts
      if faultparts.size != 1
        raise RuntimeError.new("Expecting fault message \"#{name}\" to have ONE part")
      end
      fault_part = faultparts[0]
      # WS-I Basic Profile Version 1.1 (R2205) requires fault message parts 
      # to refer to elements rather than types
      faulttype = fault_part.element
      if not faulttype
        warn("Fault message \"#{name}\" part \"#{fault_part.name}\" must specify an \"element\" attribute")
        faulttype = fault_part.type
      end
      if faulttype and result.index(faulttype).nil?
        result << faulttype
      end
    end
    result
  end