The returned object can then be used more easily for iterating over items or adding/editing/removing items from the array using the wwDotNetBridge methods to manipulate arrays which require a parent object instance.
A service method call that returns an array might look like this:
DO WebStoreServiceProxy LOCAL loService as WebStoreServiceProxy loService = CREATEOBJECT("WebStoreServiceProxy") *** Service Method Returns an Array of Objects loArrayResult = loService.DownloadInventoryItems("") && ComArray instance returned FOR lnX = 1 TO loArrayResult.Length loItem = loArrayResult.Instance[lnX] && Work with .Instance array property ? loItem.Sku + " " + loItem.Descript + " " + TRANSFORM(loItem.Price) ENDFOR
Note that there's only a single aResult property on the Proxy class which means that if you need to hang on to arrays you should copy them to a private variable or property using ACOPY() as any subsequent array method results will overwrite the aResult property.
************************************************************************ * DownloadInventoryItems **************************************** FUNCTION DownloadInventoryItems(Category as String) as wws_itemsRow[] LOCAL loException as Exception, lvResult as Object THIS.lError = .F. this.cErrorMsg = "" lvResult = .F. TRY lvResult = this.oService.DownloadInventoryItems(Category) DIMENSION this.aResult[1] IF ISNULL(lvResult) llError = .T. this.SetError("Result is null") lvResult = -1 ELSE COMARRAY(lvResult,10) ACOPY(lvResult,this.aResult) lvResult = ALEN(lvResult,1) ENDIF CATCH to loException llError = .T. this.cErrorMsg = loException.Message ENDTRY RETURN lvResult ENDFUNC * DownloadInventoryItems
Note that the array is copied and so effectively turned into a native Visual Foxpro array for easier usage. This also means that the array becomes purely read-only and cannot be passed back to .NET as an array.
If you need to pass array data back to .NET you'll need to use wwDotNetBridge's array features to create and add new items.