.net service function param, cast custom object -
i have service. create function parameter not conventionnal.
the parameter list(of keyvaluepair(of myobjecttype, integer))
but made function want array of keyvaluepairofmyobjecttypeint32.
whats best way go that?
unfortunately generics not soap friendly.
there number of limitations consider. please see section on interfaces , generics in this msdn post.
alternately please see response thread: link
its turns out xml serializer can serialize generic types of sort. neontapir correctly points out generic types not supported xml serializer can still serialise generic types creates types of itemresponseoftype[thetype] mentioned in question.
the xml serializer wont de serialize type generic type.
as far elegant solution concerned, don't have one. if else wants step in i'd interested know myself.
personally, in rare cases (similar described) i've used generics on server side, , client utilized wsdl defined class (ie: genericobjecttypeofpersontypeint32)
just clarify (and reformat whats in comments below), can still phone call next on client side:
keyvaluepairofmyobjecttypeint32.key keyvaluepairofmyobjecttypeint32.value
.net service
No comments:
Post a Comment