I have inherited a large admin winforms application that shares a 'Common' library of classes for holding data with a web service. The problem I am having is that if I return a populated instance of a class from a web service call then it comes out on the client as a different type and I cannot use the other 'Common' project logic to manipulate.
This is because although the web service will return an object of type Common.Widget it will then wrap that object up in order to transfer it over the wire. Once this is done I can't cast the object back to the 'common' type because .Net throws an InvalidCastException.
I've done this with WCF and the DataMember attribute but I can't upgrade this project to WCF right now as it is very large and the test server is Win2K (no .Net 3+ for Win2K).
So is there a way for me to do this easily or do I have to translate all of the data I get from the web service back to the raw types in the common library?
Thanks in advance
Ryan