Modifying the Proxy Class to Return Fat Objects

By default Web Services return dehydrated classes. I call these classes dehydrated because when you return a complex type from a Web Service, you get a fields-only class. However, if you want a reconstituted object from a Web Service, you can get one with a bit of chicanery.

Assume for a moment that you are building Web Services to bridge applications internally or for select customers. These customers will have your library. If this is the case, you can modify the WSDL-generated proxy class by removing the generated proxy class and referencing your .dll assembly that contains the actual object. Voilà! You have created reconstituted, or fat, objects.

If you like your milk whole instead of powdered ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.