// Get the serializer from the type mapping
QName xmlType = faultMetaData.getXmlType();
Class javaType = faultMetaData.getFaultBean();
serContext.setJavaType(javaType);
AbstractSerializerFactory serFactory = (AbstractSerializerFactory)serContext.getTypeMapping().getSerializer(javaType, xmlType);
if (serFactory == null)
throw new WebServiceException("Cannot obtain serializer factory: xmlType=" + xmlType + ", javaType=" + javaType);
try
{
SerializerSupport ser = serFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, faultObject, serContext, null);
XMLFragment xmlFragment = new XMLFragment(result);
String xmlStr = xmlFragment.toXMLString();
log.debug("Fault detail: " + xmlStr);