FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(faultDesc);
boolean isLegacy =
(faultDesc.getFaultInfo() == null || faultDesc.getFaultInfo().length() == 0);
// Get the JAXB object from the block
JAXBBlockContext blockContext = new JAXBBlockContext(marshalDesc.getPackages());
// Note that faultBean may not be a bean, it could be a primitive
Class faultBeanFormalClass;
try {
faultBeanFormalClass = loadClass(faultBeanDesc.getFaultBeanClassName());
} catch (ClassNotFoundException e){
faultBeanFormalClass = loadClass(faultBeanDesc.getFaultBeanClassName(), operationDesc.getEndpointInterfaceDescription().getEndpointDescription().getAxisService().getClassLoader());
}
// Use "by java type" marshalling if necessary
if (blockContext.getConstructionType() !=
JAXBUtils.CONSTRUCTION_TYPE.BY_CONTEXT_PATH &&
isNotJAXBRootElement(faultBeanFormalClass, marshalDesc)) {
blockContext.setProcessType(faultBeanFormalClass);
}
// Get the jaxb block and business object
Block jaxbBlock = factory.createFrom(detailBlocks[0], blockContext);
Object faultBeanObject = jaxbBlock.getBusinessObject(true);