in src/main/java/com/vmware/vim25/ws/XmlGenDom.java [162:187]
protected SoapFaultException parseSoapFault(Element root) throws Exception {
try {
SoapFaultException sfe = new SoapFaultException();
sfe.setFaultCode(root.elementText("faultcode"));
sfe.setFaultString(root.elementText("faultstring"));
sfe.setFaultActor(root.elementText("faultactor"));
Element detailE = root.element("detail");
if (detailE != null) {
List<?> subElems = detailE.elements();
if (subElems.size() != 0) {
Element faultE = (Element) subElems.get(0);
String faultTypeName = faultE.attributeValue(SoapConsts.XSI_TYPE);
if (faultTypeName != null) {
sfe.detail = (Throwable) fromXml(TypeUtil.getVimClass(faultTypeName), faultE);
}
}
}
sfe.detail = (Throwable) setDetailMessageInException(sfe.detail, root.elementText("faultstring"));
return sfe;
}
catch (RuntimeException e) {
throw new RuntimeException("Could not map the soap fault from:\n" + getContent(root), e);
}
}