Delivering Collections via Web Service

Topics: July and December Releases Forum
Jan 23, 2007 at 9:18 PM
I see much work being done in WSSF toward delivering individual objects via web services. The guidance here is great. However, I need to deliver a collection of objects via web service. Pardon my ignorance, but what is the best way to do that?
Jan 23, 2007 at 9:26 PM
You can create a MessageContract. For one or more of the members defined, you can check the box in the collection column. This will generate a collection (List) of whatever type you specify in the type column.

Hope this helps,
Don

Jan 23, 2007 at 9:30 PM
Thanks Don for your quick response. Didn't expect anything that quick. I'm still learning the in's-n-out's of this factory. It's easy to slap WebMethod in front of a method signature, but this requires a little more thought and planning. Again, thanks.
Jan 23, 2007 at 10:04 PM
Does that checkbox exist for WCF-based services only? I'm not seeing it for the ASMX-based service that I'm writing.
Jan 24, 2007 at 12:48 AM
Yes, it only exist for WCF services. We didn't change the ASMX guidance package from what was released in July (we just reshipped it) and this was something we added for the WCF guidance package. Sorry for the confusion.

Don