/* */ throws SOAPException
/* */ {
/* 221 */ assertFaultCode(faultEx.getFaultCode());
/* */
/* 223 */ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/* 224 */ SerializationContext serContext = msgContext != null ? msgContext.getSerializationContext() : new SerializationContextJAXRPC();
/* 225 */ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/* */
/* 227 */ MessageFactory factory = new MessageFactoryImpl();
/* 228 */ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
/* */
/* 230 */ SOAPEnvelopeImpl soapEnvelope = (SOAPEnvelopeImpl)soapMessage.getSOAPPart().getEnvelope();
/* 231 */ SOAPBody soapBody = soapEnvelope.getBody();
/* */
/* 233 */ QName faultCode = faultEx.getFaultCode();
/* 234 */ if (faultCode.getNamespaceURI().length() > 0) {
/* 235 */ faultCode = nsRegistry.registerQName(faultCode);
/* */ }
/* 237 */ String faultString = getValidFaultString(faultEx);
/* 238 */ SOAPFault soapFault = soapBody.addFault(new NameImpl(faultCode), faultString);
/* */
/* 240 */ String faultActor = faultEx.getFaultActor();
/* 241 */ if (faultActor != null)
/* */ {
/* 243 */ SOAPElement soapElement = soapFault.addChildElement("faultactor");
/* 244 */ soapElement.addTextNode(faultActor);
/* */ }
/* */
/* 247 */ Exception faultCause = (Exception)faultEx.getCause();
/* 248 */ Detail detail = faultEx.getDetail();
/* 249 */ if (detail != null)
/* */ {
/* 251 */ soapFault.addChildElement(detail);
/* */ }
/* 253 */ else if ((faultCause != null) && (!(faultCause instanceof RuntimeException)))
/* */ {
/* 255 */ Class javaType = faultCause.getClass();
/* */
/* 257 */ TypeMapping typeMapping = serContext.getTypeMapping();
/* */
/* 259 */ OperationMetaData opMetaData = msgContext.getOperationMetaData();
/* 260 */ if ((opMetaData != null) && (opMetaData.getFaultMetaData(javaType) != null))
/* */ {
/* 262 */ FaultMetaData faultMetaData = opMetaData.getFaultMetaData(javaType);