if (prefix == null || prefix.equals("")) {
prefix = getPrefix();
}
if (body == null) {
NameImpl bodyName = getBodyName(prefix);
body = (BodyImpl) createElement(bodyName);
insertBefore(body, null);
body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI());
} else {
log.severe("SAAJ0122.impl.body.already.exists");
throw new SOAPExceptionImpl("Can't add a body when one is already present.");
}