![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| | #4 (permalink) |
| | 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 Specs![]() |
| | #5 (permalink) |
| | 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 Specs![]() |
| | #6 (permalink) |
| | 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 Specs![]() |
| | #7 (permalink) |
| | 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 Specs![]() |
| 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 | |||