CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (detail != null && msgContext != null)
{
log.debug("Processing detail");
SerializationContext serContext = msgContext.getSerializationContext();
TypeMapping typeMapping = serContext.getTypeMapping();
Iterator it = detail.getDetailEntries();
while (it.hasNext())
{
DetailEntry deElement = (DetailEntry)it.next();
QName xmlName = deElement.getElementQName();
log.debug("Processing detail entry: " + xmlName);
OperationMetaData opMetaData = msgContext.getOperationMetaData();
FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
if (faultMetaData != null)
{
log.debug("Deserialize fault: " + faultMetaData);
QName xmlType = faultMetaData.getXmlType();
Class<?> faultBeanClass = faultMetaData.getFaultBean();
// Get the deserializer from the type mapping
AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(faultBeanClass, xmlType);
if (desFactory == null)
throw new WebServiceException("Cannot obtain deserializer factory: xmlType=" + xmlType + ", javaType=" + faultBeanClass);
// http://jira.jboss.org/jira/browse/JBWS-955
// Cannot deserialize fault detail