Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing an array of objects to a property
Message
From
16/04/2008 09:50:15
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Storing an array of objects to a property
Miscellaneous
Thread ID:
01311077
Message ID:
01311077
Views:
71
I have created a .NET DLL to wrap communications to a WebService and then use COMInterop to connect from VFP.

I have everything working at a basic level, but want to encapsulate the calls so that they return a standard response (an object) to VFP.

I have defined a class;
Public Class wsResponseHandler
    Public ReturnCode As Integer = 0
    Public Results As Array
    Public ErrorMessage As String = "Initiated"
End Class
In most (but not all) cases the Web Service returns an object that has a return code and an array of "entity" objects which vary depending on the call made. Where the Web Service does not return an object I would like to convert the response to that VFP gets as standard response every time. Also the call to the Web Service may fail in which case I want to store my own ReturnCode and ErrorMessage.

My problem is that I can not seem to store the Web Services array of objects to my array property.

I have tried ;
 WsResults.CopyTo(MyResponse.Results,1)
And various other ideas that I could think of but without success. The above erorrs in .NET ("value cannot be null.") and anything else I try VFP can not see the results objects.

I am probably missing something really basic as I am a .NET newbie!


Regards


Gary.
Next
Reply
Map
View

Click here to load this message in the networking platform