Support marshalling non-enums as enums

Typelist types are no longer enums, but we want to marshal them as enums in SOAP. This change adds support for this.