Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accesing a Web Service with VFP
Message
From
28/04/2020 14:19:34
 
 
To
28/04/2020 13:20:40
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01674162
Message ID:
01674189
Views:
55
>Luis, lots of guesswork here because I don't have the specs of the service (I don't even know what its purpose is), but you could eventually use the following as a template for the call:
>
>
>TEXT TO m.Parametros NOSHOW
>{
>   "linea":"3",
>   "id_contrato":"470",
>   "cod_rastreo":"12233",
>   "cod_barra":"33333",
>   "fech_emi_vent":"03/03/2020",
>   "nro_o_compra":"203075",
>   "nro_guia_trans":"00003",
>   "nro_factura":"9999992",
>   "cod_cliente":"203075",
>   "nom_cliente":"EXPERTTYA S A ASESORA",
>   "nom_empresa":"EXPRERTTYA S A ASESORA",
>   "nro_telf":"2344322",
>   "nro_telf_mobil":"982095642",
>   "correo_elec":"",
>   "dir_entrega":"FRANCISCO ANDRADE MARIN",
>   "nro_via":0,
>   "nro_int":"45-129",
>   "nom_urb":"",
>   "ubi_direc":"010103",
>   "ref_direc":"NA",
>   "id_direc":0,
>   "fech_proc":"20/12/2019",
>   "arco_hor":"PM",
>   "fech_venc":"03/03/2020",
>   "nom_autorizado":"MAINDER BPM",
>   "nro_doc_autorizado":"203075",
>   "nom_autorizado_2":"",
>   "nro_doc_autorizado_2":"",
>   "med_pago":"",
>   "descripcion":"Prueba",
>   "anotacion":"",
>   "moneda":"DOL",
>   "importe":"2.5",
>   "peso_total":"0.5",
>   "pieza_total":2,
>   "urgente":"NO",
>   "picking":"NO",
>   "mecanizado":"SI",
>   "asegurado":"SI",
>   "monto_asegurado":"5",
>   "via_aerea":"NO",
>   "venta_seller":"NO",
>   "sell_codigo":"",
>   "sell_nombe":"",
>   "sell_direcc":"",
>   "sell_ubigeo":"",
>   "produtos":[
>      {
>         "cod_sku":"09",
>         "descr_sku":"SOBRES",
>         "modelo_sku":"MODELO",
>         "marca_sku":"MARCA PRODUCTO",
>         "peso_sku":"1.5",
>         "peso_v_sku":"1.2",
>         "valor_sku":"2.5",
>         "cantidad_sku":"3",
>         "alto":"1.5",
>         "largo":"50",
>         "ancho":"200"
>      }
>   ],
>   "cedibles":[
>      {
>         "cod_pod":"001",
>         "descr_pod":"55500025"
>      }
>   ]
>}
>ENDTEXT
>
>
>Since the service is expecting url-encoded character data, the value of m.Parametros should be transformed accordingly. There are a few functions in VFP that do this, you may google for it, but just say something here if you couldn't find one.

Thank you very much, although I didn't yet try your example, I guess it will work, and for converting I guess I found an UDF here:

https://stackoverflow.com/questions/3063750/urlencode-in-foxpro

Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform