Web Service Proxy Generator
Long Type
Gravatar is a globally recognized avatar based on your email address. Long Type
  n/a
  All
  Mar 1, 2015 @ 11:19am

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

Gravatar is a globally recognized avatar based on your email address. Re: Long Type
  Rick Strahl
  Xavier Desemberg
  Mar 2, 2015 @ 12:50pm
Hi 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




Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024