return true;
}
// look up the serializer in the TypeMappingRegistry
SerializerFactory factory;
if (tm != null) {
factory = (SerializerFactory) tm.getSerializer(type, qName);
} else {
factory = (SerializerFactory) defaultTM.getSerializer(type, qName);
}
// If no factory is found, use the BeanSerializerFactory
// if applicable, otherwise issue errors and treat as an anyType
if (factory == null) {
if (isEnumClass(type)) {
factory = new EnumSerializerFactory(type, qName);
} else if (isBeanCompatible(type, true)) {
factory = new BeanSerializerFactory(type, qName);
} else {
return false;
}
}
// factory is not null
Serializer ser = (Serializer) factory.getSerializerAs(Constants.AXIS_SAX);
// if we can't get a serializer, that is bad.
if (ser == null) {
throw new AxisFault(Messages.getMessage("NoSerializer00",
type.getName()));