Serializer ser = getSerializer(cls, xmlType, null);
// The java type is an array, but we need a simple type.
if (ser instanceof ArraySerializer)
{
SimpleListSerializerFactory factory =
new SimpleListSerializerFactory(cls, xmlType);
ser = (Serializer)
factory.getSerializerAs(getEncodingStyle());
}
if (!(ser instanceof SimpleValueSerializer)) {
throw new IOException(
Messages.getMessage("needSimpleValueSer",