My current set up is an ASMX web service that has an Item object, and returns a List<> of Items.
Item has 114 fields of various types. It is consumed by .NET web apps, as well as Java web apps (using Axis2 to generate a client proxy).
My problem is that every time we want to add a field to the result set, we have to modify the service to add the field to the object, as well as generate a new client proxy for the java side. Also, the mapping of the sql fields to the object fields is one large method loading each field from the datareader into the object, making sure to convert to the proper datatype.
Is there a more dynamic way to do this? I looked into a list of Dictionary, but that cannot be serialized. An alternative is to send a List<> of Struct with Key and Value fields. This now puts the effort of parsing the types onto the client, which isn't necessarily optimal.
Is there a pattern that handles something like this, or barring that, does anyone have a good solution to help make this a little more maintainable? I'm open to converting it to WCF (though I am not too familiar with WCF) if there is a decent way for our Java apps to consume the service.
If you need more details, just ask. Thanks!