When we had this problem, we finished mapping the fields in Java in the utility class. This is a real problem, especially when you have to map several different web services and have to record mappings for each of them (some of them are a simple 2D map of named attributes, not a hierarchy of objects, screams).
However, this way you have the opportunity to analyze the requirements of the target map to get the best display quality, set default values when data is not installed, and so on. You can throw the usual "UndefinedMappingException" in your mapper where you need it. And, not being a fluffy library that uses reflections and / or complex XML mapping configuration files, it draws faster.
Ie, this is a post claiming to "write it in Java."
Jeebee
source share