HighTechTalks DotNet Forums  

Strongly Typed Collections

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Strongly Typed Collections in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Dave T
 
Posts: n/a

Default Strongly Typed Collections - 03-17-2008 , 03:42 PM






I'm writing a web service that I want to return a strongly typed collection.
If I inherit System.collections.generic.list(of T) it returns an ArrayOfT.
If I inherit CollectionsBase, it also returns an ArrayOf. I want the root
xml element to just be of the class itself (if that makes any sense). Is
this even possible? What do I need to inherit?

Reply With Quote
  #2  
Old   
sloan
 
Posts: n/a

Default Re: Strongly Typed Collections - 03-17-2008 , 03:51 PM








If you want a strong object/collection on the outside world (of a web
service)...then the client needs to know something about some kind of strong
collection.
...

Take a look here:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry

I have a IZebraCollection.......which the service and the host know about.

Its WCF, but WCF can be exposed as a webservice.

...




"Dave T" <DaveT (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm writing a web service that I want to return a strongly typed
collection.
If I inherit System.collections.generic.list(of T) it returns an ArrayOfT.
If I inherit CollectionsBase, it also returns an ArrayOf. I want the root
xml element to just be of the class itself (if that makes any sense). Is
this even possible? What do I need to inherit?



Reply With Quote
  #3  
Old   
sloan
 
Posts: n/a

Default Re: Strongly Typed Collections - 03-17-2008 , 03:51 PM





If you want a strong object/collection on the outside world (of a web
service)...then the client needs to know something about some kind of strong
collection.
...

Take a look here:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry

I have a IZebraCollection.......which the service and the host know about.

Its WCF, but WCF can be exposed as a webservice.

...




"Dave T" <DaveT (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm writing a web service that I want to return a strongly typed
collection.
If I inherit System.collections.generic.list(of T) it returns an ArrayOfT.
If I inherit CollectionsBase, it also returns an ArrayOf. I want the root
xml element to just be of the class itself (if that makes any sense). Is
this even possible? What do I need to inherit?



Reply With Quote
  #4  
Old   
sloan
 
Posts: n/a

Default Re: Strongly Typed Collections - 03-17-2008 , 03:51 PM





If you want a strong object/collection on the outside world (of a web
service)...then the client needs to know something about some kind of strong
collection.
...

Take a look here:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry

I have a IZebraCollection.......which the service and the host know about.

Its WCF, but WCF can be exposed as a webservice.

...




"Dave T" <DaveT (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm writing a web service that I want to return a strongly typed
collection.
If I inherit System.collections.generic.list(of T) it returns an ArrayOfT.
If I inherit CollectionsBase, it also returns an ArrayOf. I want the root
xml element to just be of the class itself (if that makes any sense). Is
this even possible? What do I need to inherit?



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.