Returning Collections from Web Service
-
Hi, I'm trying to write my first serious (not 'Hello WOrld') web service to return a collection of objects. However, despite having the correct type return in the WS - public SubstanceCollection GetSubstances() - the consumer will only return an array of objects, which appear to actually be XML Nodes. I would like to be able to access the objects as a collection -- am I missing something? :confused: Dr Herbie. Remember, half the people out there have below average IQs.
-
Hi, I'm trying to write my first serious (not 'Hello WOrld') web service to return a collection of objects. However, despite having the correct type return in the WS - public SubstanceCollection GetSubstances() - the consumer will only return an array of objects, which appear to actually be XML Nodes. I would like to be able to access the objects as a collection -- am I missing something? :confused: Dr Herbie. Remember, half the people out there have below average IQs.
OK, almost there. I continued delving around in MSDN and found the article : DataSets, Web Services, DiffGrams, Arrays, and Interoperability[^] So I now have a web method that returns an array of classes. Hooray.:) But is it still possible to return a typed collection (as opposed to an array)? Dr Herbie. Remember, half the people out there have below average IQs.