/* 97 */ QName faultCode = ((NameImpl)soapFault.getFaultCodeAsName()).toQName();
/* 98 */ String faultString = soapFault.getFaultString();
/* 99 */ String faultActor = soapFault.getFaultActor();
/* 100 */ Detail detail = soapFault.getDetail();
/* */
/* 102 */ SOAPFaultException faultEx = new SOAPFaultException(faultCode, faultString, faultActor, detail);
/* */
/* 104 */ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/* 105 */ if ((detail != null) && (msgContext != null))
/* */ {
/* 107 */ SerializationContext serContext = msgContext.getSerializationContext();
/* 108 */ TypeMapping typeMapping = serContext.getTypeMapping();
/* */
/* 110 */ Iterator it = detail.getDetailEntries();
/* 111 */ while (it.hasNext())
/* */ {
/* 113 */ DetailEntry deElement = (DetailEntry)it.next();
/* 114 */ Name deName = deElement.getElementName();
/* 115 */ QName xmlName = new QName(deName.getURI(), deName.getLocalName());
/* */
/* 117 */ OperationMetaData opMetaData = msgContext.getOperationMetaData();
/* 118 */ FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
/* 119 */ if (faultMetaData != null)
/* */ {
/* 121 */ if (log.isDebugEnabled())
/* 122 */ log.debug("Deserialize fault: " + faultMetaData);
/* 123 */ QName xmlType = faultMetaData.getXmlType();
/* 124 */ Class javaType = faultMetaData.getJavaType();
/* */
/* 127 */ AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(javaType, xmlType);
/* 128 */ if (desFactory == null) {
/* 129 */ throw new JAXRPCException("Cannot obtain deserializer factory for: " + xmlType);
/* */ }
/* */
/* */ try
/* */ {
/* 136 */ String prefix = deName.getPrefix();
/* 137 */ if (prefix.length() > 0)
/* */ {
/* 139 */ String nsURI = deName.getURI();
/* 140 */ String attrValue = deElement.getAttribute("xmlns:" + prefix);
/* 141 */ if ((nsURI.length() > 0) && (attrValue.length() == 0)) {
/* 142 */ deElement.addNamespaceDeclaration(prefix, nsURI);
/* */ }
/* */ }
/* 145 */ Source xmlFragment = new DOMSource(deElement);
/* 146 */ DeserializerSupport des = desFactory.getDeserializer();
/* 147 */ Object userEx = des.deserialize(xmlName, xmlType, xmlFragment, serContext);
/* 148 */ if ((userEx == null) || (!(userEx instanceof Exception))) {
/* 149 */ throw new WSException("Invalid deserialization result: " + userEx);
/* */ }
/* 151 */ faultEx.initCause((Exception)userEx);
/* */ }
/* */ catch (RuntimeException rte)
/* */ {
/* 155 */ throw rte;
/* */ }