FoxPro Programming
west wind proxy
Gravatar is a globally recognized avatar based on your email address. west wind proxy
  Marcos Ramos
  All
  Feb 5, 2018 @ 11:07am

i has been testing the west wind proxy server generator to access a web service that i created in java ; i only has two methods one that retrieve one row an the other that retrieve all table ; this method return array list with 11 rows and 4 columns and i have this code in visual fox 9; the proxy generator generated this class
"servicioPersonaProxy.prg" with this two methods buscar() and buscarpersona() my visual fox pro code is this

DO f:\foxwebapp\servicioPersonaProxy
loProxy=createobject("servicioPersonaProxy")
local Result
Result=loProxy.buscarpersona()
to test what i get from the method use this code
? Result 

i get this (object) in screen and do not know how manipulate o view the result of this method in visual foxpro i want to put the Result in to a cursor or a grid; i don't know to do this i am new in visual fox but i can not get too much info about these topic ...

Gravatar is a globally recognized avatar based on your email address. re: west wind proxy
  Rick Strahl
  Marcos Ramos
  Feb 5, 2018 @ 01:22pm

Not sure what you should get back, but I believe it's going to be an array of objects which with wwDotnetBridge gets returned as a ComArray class.

Something like this:

*** Method returns wws_Item[] array from .NET - FoxPro gets ComArray instance
loItems = loBridge.YourProxyServiceMethod(loInstance,"GetInventoryItemsArray","Books")

*** .NET Arrays are 0 based!
FOR lnX = 0 to loItems.Count -1
    loItem = loItems.Item(lnX)  && Retrieve an array item
    ? loItem.Sku + " " + loItem.Descript + " " + TRANS(loItem.Price)
ENDFOR

+++ Rick ---

© 1996-2024