return elem;
}
private Element createFault(Errors errs) throws SOAPException {
SOAPFault fault = new SOAPFault();
StringBuffer buffer = new StringBuffer();
ResourceBundle bundle = ResourceLocator.getBundle();
for (Error error : errs.get()) {
String msg = bundle.getString(error.getKey());
if (msg == null) {
buffer.append("Could not find resource for key: " + error.getKey()); //$NON-NLS-1$
LOGGER.severe("Error creating SOAP fault message. Missing resource for key: " + error.getKey()); //$NON-NLS-1$
} else {
buffer.append(MessageFormatter.format(msg, error.getValues()));
}
buffer.append("\n"); //$NON-NLS-1$
}
fault.setDetailMessage(buffer.toString(), true);
return fault.getElement();
}