c# - How to use a custom array type defined in WSDL? -
c# - How to use a custom array type defined in WSDL? -
trying larn how consume wsdl in delphi 7 application. wsdl i'm trying consume has custom array type.
pascal
arrayofsomething = array of something; how instantiate array type?
have tried:
pascal
var somethinglist : arrayofsomething; begin somethinglist := arrayofsomething... end; the ... above means i'm looking method , not finding one. normal way instantiate object like:
pascal
var object : classname; begin object := classname.create; end; so can see why i'd trying create array in same kind of way, though it's not object.
bear in mind, i'm cribbing c# code , trying create work in pascal. original c# like:
c#
list<something> somethinglist = new list<something>(); and usage like:
c#
envelope.listfield = somethinglist.toarray(); i've tried this:
pascal
var somethinglist : tlist; begin somethinglist := tlist.create; end; yeah, works until seek feed envelope.
pascal
envelope.listfield := somethinglist; envelope expecting arrayofsomething not tlist. error "incompatible types, tlist , arrayofsomething."
an array of built-in type, not class. set size, utilize setlength(), e.g.
var arr: arrayofsomething; begin setlength(arr, 273); also note not same list, array has no built-in way insert or delete values. can read , alter values, or alter size of array, no more.
if want generics, in c#, you'll have utilize higher version of delphi 7. i'm not sure, think introduced in delphi 2010 or delphi xe. guess can update me on (update: david heffernan told me it's version 2009)
in these higher versions, can utilize tlist<t>, want. until then, can utilize tlist, holds pointers (but not straight usable in connection wsdls, contents may have moved array first). may have utilize new(), dispose() , casts utilize it.
c# delphi wsdl
Comments
Post a Comment