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]
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