throws SOAPException {
String localName = element.getLocalName();
if ("Detail".equalsIgnoreCase(localName)) {
if (hasDetail()) {
log.severe("SAAJ0436.ver1_2.detail.exists.error");
throw new SOAPExceptionImpl("Cannot add Detail, Detail already exists");
}
String uri = element.getElementQName().getNamespaceURI();
if (!uri.equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
log.severe("SAAJ0437.ver1_2.version.mismatch.error");
throw new SOAPExceptionImpl("Cannot add Detail, Incorrect SOAP version specified for Detail element");
}
}
if (element instanceof Detail1_2Impl) {
ElementImpl importedElement = (ElementImpl) importElement(element);
addNode(importedElement);