views:

27

answers:

2

Hi all,
wanna ask for your opinion. What would be the best object (Array, List<>, Collection,...) used in webservice when returning list of business objects. Like a list of customer or history list.

Some ideas:

  • because I want minimize amount of data transafered between client and server
  • because I want simplify xml serialization
  • I dont expect any extra functionality at server side, just simple select

Any tip, opinion most welcome. Cheers, X.

A: 

I would use List of the objects you want to return. You can then specify if you want to to appear as array of T or List at the client (I would use List).

Kevin
A: 

All collections are passed in the same manner. I pass as Lists<> because it is easy to manipulate before serilization.

You can configure the consumer to use whatever you want, and it should be deserialized properly.

John Gietzen