nwang66
16 years agoContributor
Access Object Array
Hi,
The question is very basic, how to new/create an object array? I am testing a web service. The web service's method GetSiteIDlookupResult() returns a parameter, which is an object, type is SiteIDLookupInParam. The object has one property, which is an object array. Please see the screen shot about web service. The following is my code.
var result1 = new SiteIDLookupResult();
var result1 = WebServices.CSISServeWS.GetSiteIDLookupResult(myPara);
Log.Message(result1.Message);
var siteResult = new ArrayOfSiteIDLookup();
siteResult = result1.SiteIDLookupList;
Log.Message(siteResult.TypeName);
////////// so far it is good /////////////////
var siteList = ODT.Classes.NewArray();
siteList = siteResult.SiteIDLookup; // this is an array of SiteIDLookup
//the array - siteList is empty, but not null. No value is pass to siteList...?
var node = new SiteIDLookup();
node = siteList.CityName;
Appreciate any hints!
Nancy
The question is very basic, how to new/create an object array? I am testing a web service. The web service's method GetSiteIDlookupResult() returns a parameter, which is an object, type is SiteIDLookupInParam. The object has one property, which is an object array. Please see the screen shot about web service. The following is my code.
var result1 = new SiteIDLookupResult();
var result1 = WebServices.CSISServeWS.GetSiteIDLookupResult(myPara);
Log.Message(result1.Message);
var siteResult = new ArrayOfSiteIDLookup();
siteResult = result1.SiteIDLookupList;
Log.Message(siteResult.TypeName);
////////// so far it is good /////////////////
var siteList = ODT.Classes.NewArray();
siteList = siteResult.SiteIDLookup; // this is an array of SiteIDLookup
//the array - siteList is empty, but not null. No value is pass to siteList...?
var node = new SiteIDLookup();
node = siteList.CityName;
Appreciate any hints!
Nancy