I am trying to come up with a way to wrap a very large web service that changes very frequently. There are 400+ types and each type has 20 to 300 attributes.
The service is a SalesForce.com Enterprise API.
Typically in this scenario I would create a corresponding domain model and interfaces and use AutoMapper or similar.
Due to the size and changeability of the web service, this approach would mean a maintainability nightmare... T4 to the resuce?
Unfortunately not - the types that are generated from the web service do not tie-up nicely! There are areas where the auto-generation could not determine the object types.
Wherever a type has a property that represents a collection of other objects, instead of producing an IEnumerable<SomeType
> it generates a SalesForceQueryObject - so there is no way for me to determine the actual type that the collection contains.
Does anybody have a way to encapsulate this monster, that doesn't involve hand-cranking and maintaining 100's of thousands of lines of code? The code that is generated for the service reference is currently 347,000 lines long