Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Generics Limitation with WCF

 
 
Old 09-09-2006   #1 (permalink)
wschaub


 
 

Generics Limitation with WCF

We have been told at a Microsoft event today, that Generics are not
"possible" with Web Services and Windows Communication Services, i.e. to be
used as part of the service interface, "apparently" because of SOAP
restrictions. Is this true and if yes, what are the limitations and
restrictions? We are puzzled, because we have successfully used generics
with ASMX Web Service a while ago.



My System SpecsSystem Spec
Old 09-10-2006   #2 (permalink)
Arkady Frenkel


 
 

Re: Generics Limitation with WCF

Do you mean that you succeed in defining interface functions with
parameters/ret values as generics and inplementing client proxy as such ?
That should not work at least when I tried that
Arkady

"wschaub" <willy@bbd.co.za> wrote in message
news:eVlpybA1GHA.1548@TK2MSFTNGP02.phx.gbl...
> We have been told at a Microsoft event today, that Generics are not
> "possible" with Web Services and Windows Communication Services, i.e. to
> be
> used as part of the service interface, "apparently" because of SOAP
> restrictions. Is this true and if yes, what are the limitations and
> restrictions? We are puzzled, because we have successfully used generics
> with ASMX Web Service a while ago.
>



My System SpecsSystem Spec
Old 09-12-2006   #3 (permalink)
wschaub


 
 

Re: Generics Limitation with WCF

It works for ASMX services, however, the client proxy resorts back to .NET
types. The generics therefore are happy on server and disappear across the
piece of copper wire q;-)

"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:OWnktNL1GHA.4452@TK2MSFTNGP02.phx.gbl...
> Do you mean that you succeed in defining interface functions with
> parameters/ret values as generics and inplementing client proxy as such ?
> That should not work at least when I tried that
> Arkady
>
> "wschaub" <willy@bbd.co.za> wrote in message
> news:eVlpybA1GHA.1548@TK2MSFTNGP02.phx.gbl...
>> We have been told at a Microsoft event today, that Generics are not
>> "possible" with Web Services and Windows Communication Services, i.e. to
>> be
>> used as part of the service interface, "apparently" because of SOAP
>> restrictions. Is this true and if yes, what are the limitations and
>> restrictions? We are puzzled, because we have successfully used generics
>> with ASMX Web Service a while ago.
>>

>
>



My System SpecsSystem Spec
Old 09-13-2006   #4 (permalink)
Arkady Frenkel


 
 

Re: Generics Limitation with WCF

Yes, that what I mean , the same as you define constructor for your
datacontract class ( nice on service ), but that will not appear in proxy,
so you need to do it manually on client
Arkady

"wschaub" <willy@bbd.co.za> wrote in message
news:eSGJKlp1GHA.3908@TK2MSFTNGP05.phx.gbl...
> It works for ASMX services, however, the client proxy resorts back to .NET
> types. The generics therefore are happy on server and disappear across the
> piece of copper wire q;-)
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:OWnktNL1GHA.4452@TK2MSFTNGP02.phx.gbl...
>> Do you mean that you succeed in defining interface functions with
>> parameters/ret values as generics and inplementing client proxy as such ?
>> That should not work at least when I tried that
>> Arkady
>>
>> "wschaub" <willy@bbd.co.za> wrote in message
>> news:eVlpybA1GHA.1548@TK2MSFTNGP02.phx.gbl...
>>> We have been told at a Microsoft event today, that Generics are not
>>> "possible" with Web Services and Windows Communication Services, i.e. to
>>> be
>>> used as part of the service interface, "apparently" because of SOAP
>>> restrictions. Is this true and if yes, what are the limitations and
>>> restrictions? We are puzzled, because we have successfully used generics
>>> with ASMX Web Service a while ago.
>>>

>>
>>

>
>



My System SpecsSystem Spec
Old 09-27-2006   #5 (permalink)
Shawn Cicoria


 
 

Re: Generics Limitation with WCF

Take a look at Juval Lowy's





"wschaub" <willy@bbd.co.za> wrote in message
news:eVlpybA1GHA.1548@TK2MSFTNGP02.phx.gbl...
We have been told at a Microsoft event today, that Generics are not
"possible" with Web Services and Windows Communication Services, i.e. to be
used as part of the service interface, "apparently" because of SOAP
restrictions. Is this true and if yes, what are the limitations and
restrictions? We are puzzled, because we have successfully used generics
with ASMX Web Service a while ago.


My System SpecsSystem Spec
Old 09-27-2006   #6 (permalink)
Shawn Cicoria


 
 

Re: Generics Limitation with WCF

Take a look at Juval Lowy's sample on CustomCollections located here:
http://www.idesign.net/idesign/Deskt...1#WCFContracts
http://www.idesign.net/idesign/Deskt...9&download=172

He discusses this exact problem and demonstrates how with the
CollectionDataContractAttribute.


Shawn Cicoria | Developer & Platform Evangelist | D&PE Communications &
Media Services | Microsoft Corporation

My System SpecsSystem Spec
Old 09-28-2006   #7 (permalink)
Arkady Frenkel


 
 

Re: Generics Limitation with WCF

IMHO wschaub doesn't mean collection as a parameter to/from service method
which really work nice both directly ( List<>,Directory<>) and through
CollectionDataContract , that is my preferable because in that case svcutil
generate proxy for list and not as in the case of List<T> it generate T[]
for parameter , so T[n] have to be allocated and each element have to be set
with SetValue , opposite to Add() as much as need in the case of
CollectionDataContract
Arkady

"Shawn Cicoria" <shawn@NOSPAM.com> wrote in message
news:u9ghCTn4GHA.3604@TK2MSFTNGP03.phx.gbl...
> Take a look at Juval Lowy's sample on CustomCollections located here:
> http://www.idesign.net/idesign/Deskt...1#WCFContracts
> http://www.idesign.net/idesign/Deskt...9&download=172
>
> He discusses this exact problem and demonstrates how with the
> CollectionDataContractAttribute.
>
>
> Shawn Cicoria | Developer & Platform Evangelist | D&PE Communications &
> Media Services | Microsoft Corporation
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Question on design involving some Generics .NET General
Generics and collections .NET General
Re: Generics and comparison (follow on from my previous "Generics and collections" thread) .NET General
Re: Generics and comparison (follow on from my previous "Generics and collections" thread) .NET General
Checking for DBNull with generics .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46