If you're object structure is something like this:
loProxy.oSubObject.Property
you have to ensure that oSubObject exists. You have to create an instance of this object first. Something like this:
loProxy = CREATEOBJECT("MyServceProxy") loProxy.oSubObject = loProxy.oBridge.CreateInstance("Namespace.ClassName") loProxy.oSubObject.Property = "New Value"
All objects are null by default so if there's any object hierarchy you have to create each instance first before you can access any of its child properties.
+++ Rick ---
Hi Rick,
I'm not sure if you saw my reply to your answer. My question now is, what am I supposed to "load up" for loInstance? Remember, this error is happening on the CREATEOBJECT() line which is only the second line of code.
Thanks,
Mike
Typically that's in invalid property name. Make sure the object you're setting the value on actually is an instance (ie. not null)... IOW, loInstance in your example has to be loaded up first before you can start setting properties on the object.
+++ Rick ---
I apologize if this isn't the correct Forum to post this question, but, the drop down list does not have an entry for "West Wind Web Service Proxy Generator".
After generating the classes via the wizard, I'm trying to use the code from VFP9.0 as follows:
I receive the following Program Error from the Function SetProperty(loInstance, lcProperty, lvValue) in the wwdotnetbridge.prg:
"OLE IDispatch exception code 0 from wwDotNetBridge: Index was outside the bounds of the array..."
From the VFP debugger I can see the following values:
loInstance = .NULL.
lcProperty = "Url"
lvValue = "https://tm.sclintegrations.com/WebServices.svc"
Does anyone have any idea what is causing this error?
TIA
| Rick Strahl West Wind Technologies Where do you want to surf today? | Reader Version: 5.0 |