I'm new to the whole web service space, so pardon the question if it seems stupid or obvious!
I have a number of entities that can be provided by a new web service that I am creating. Some of these entities are composed of very large graphs of objects.
However, at times the client will want to search for some of these entities and get back a (potentially large) result set. I am thinking that this result set should contain a lighter weight representation of these huge entities, rather than the entire entity. After all they are only going to be displayed in a 'entities found' list on a GUI...and then individually retrieved.
What's a good pattern for handling this problem? I am particularly concerned in how it relates to my XML schema? If I use the same XML element type as the heavy weight representation (say with an isSkeleton boolean switch), then all of my XML constraints are rendered useless (because child elements won't be there).
On the other hand, if I make a specialized "lightweight" DTO for every potentially large entity (with its own XML definition) then I need to hassle with the conversion to and from these DTOs and my entities.