Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing an array of objects to a property
Message
From
20/04/2008 13:42:46
 
 
To
16/04/2008 09:50:15
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01311077
Message ID:
01311964
Views:
16
Not sure I can help Gary, not really having done COMInterop with VFP, but let me ask a question. Have you gotten this to work prior to trying to encapsulate everything with this wsResponseHandler class? Can you post some of *that* code?

~~Bonnie



>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.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform