Returning a collection from a web service function
-
I have a base class, lets call it A. Two classes, B and C, in herit from it. I am trying to return a series of objects of type B and C from a web service function. I can't use an array because it cant hold types B and C. I can't use a collection because it can't be serialized.... Any ideas?? :wtf::rolleyes:
-
I have a base class, lets call it A. Two classes, B and C, in herit from it. I am trying to return a series of objects of type B and C from a web service function. I can't use an array because it cant hold types B and C. I can't use a collection because it can't be serialized.... Any ideas?? :wtf::rolleyes:
-
An array of A :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
-
Leppie's right. An array of A (it's the base class after all) then just cast it back to the appropriate B or C. You can also write a serializer if you want to (they actually aren't that hard in most cases).