if (faultMsgName == null) {
faultMsgName = exClass.getSimpleName();
}
QName faultName = getFaultName(service, op, exClass, beanClass);
FaultInfo fi = op.addFault(new QName(op.getName().getNamespaceURI(), faultMsgName),
new QName(op.getName().getNamespaceURI(), faultMsgName));
fi.setProperty(Class.class.getName(), exClass);
fi.setProperty("elementName", faultName);
MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(),
exClass.getSimpleName()));
mpi.setElementQName(faultName);
mpi.setTypeClass(beanClass);
sendEvent(Event.OPERATIONINFO_FAULT, op, exClass, fi);
return fi;