Hello
I am using the web service proxy and so far so good
in the example below I need to pass the storeID as a Long (type)
How do I do that ?
loItem3 = lobridge.createInstance("PosProviderWS.storeTrxDetails")
loitem3.basketId = '12'
loitem3.cashierId = 'ADMIN'
loitem3.posId = '0011'
loitem3.storeId = 1050
loitem3.trxId = '12'
I have tried
loval = loBridge.converttodotnetvalue(1050,"int64")
loBridge.SetProperty(loItem3,"storeId",loVal)
but does not seem to work
Can someone help ?
Question 2
Also how can I read a Long type when returned from the webservice ?
Thanks
Xavier
Long is a type that FoxPro has no support for directly so special synatax is required to pass Com Values from Fox to .NET and back.
The following code should work:
loVal = loBridge.CreateComValue()** set a long value
loVal.SetLong(11)*** use it in .NET - you have to use the indirect methods
loBridge.SetProperty(loItems3,"StoreId",loVal)
ComValue works by allowing you to assign the value from FoxPro and then keeping the value inside of .NET until it's unpacked when you call SetProperty() or InvokeMethod().
More info here:
wcdocs:_3481232sd.htm
+++ Rick ---
Hello
I am using the web service proxy and so far so good
in the example below I need to pass the storeID as a Long (type)
How do I do that ?
loItem3 = lobridge.createInstance("PosProviderWS.storeTrxDetails")
loitem3.basketId = '12'
loitem3.cashierId = 'ADMIN'
loitem3.posId = '0011'
loitem3.storeId = 1050
loitem3.trxId = '12'
I have tried
loval = loBridge.converttodotnetvalue(1050,"int64")
loBridge.SetProperty(loItem3,"storeId",loVal)
but does not seem to work
Can someone help ?
Question 2
Also how can I read a Long type when returned from the webservice ?
Thanks
Xavier
West Wind Technologies
Making waves on the Web
from Maui