locked
Return a collection of objects from Web service RRS feed

  • Question

  • Greetings:

    I nave an employee class (with ID, FName, LName, Age). Also I have a web service which needs to return a list of employees. I understand I cannot use collection objects or generic classes. Please let me know what are my options.

     

    Any samples or links will be much appreciated 

     

    Much thanks!

    Sunday, July 15, 2007 8:43 PM

Answers

  • Where have you got that information from? It's wrong. You can return either generic or non-generic collections from a web service.

     

    Note, however, that when somebody adds a reference to your web service then the collection type may change as WSDL does not specify how the collection must be implemented (being a cross-platform specification) so someone using the service may see it as an array, or a generic collection, or whatever their language and web proxy generator supports.

     

    Try it - it will only take you ten minutes!

    Sunday, July 15, 2007 10:34 PM