Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Generics Limitation with WCF

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 09-09-2006   #1 (permalink)
wschaub
Guest


 

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
Guest


 

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
Guest


 

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
Guest


 

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
Guest


 

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
Guest


 

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
Guest


 

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
 
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on design involving some Generics Chris .NET General 0 04-06-2008 11:45 PM
Generics and collections Martin Robins .NET General 8 04-05-2008 04:56 PM
Re: Generics and comparison (follow on from my previous "Generics and collections" thread) Barry Kelly .NET General 2 04-05-2008 09:36 AM
Re: Generics and comparison (follow on from my previous "Generics and collections" thread) Rudy Velthuis .NET General 0 04-04-2008 02:13 PM
Checking for DBNull with generics Leon Mayne .NET General 7 03-31-2008 09:55 AM



Vistax64.com 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 2005-2008