String type = thrw.getType();
Message fmsg = (Message)fltmap.get(type);
if (fmsg == null) {
// first time for this throwable, create the message
FaultCustom fault = wsdlcustom.forceFaultCustomization(type);
QName fqname = new QName(sns, fault.getElementName());
MessagePart part = new MessagePart("fault", fqname);
fmsg = new Message(fault.getFaultName(), wns);
fmsg.getParts().add(part);
def.addMessage(fmsg);
def.addNamespace(sns);
// make sure the corresponding mapping exists
BindingMappingDetail detail = m_bindingGenerator.getMappingDetail(fault.getDataType());
if (detail == null) {
throw new IllegalStateException("No mapping found for type " + type);
}
// record that the fault has been defined