Powerbuilder - Access data in response to webservice

0

I am trying to consume an external webservice of SOAP type in Powerbuilder (2017). Not being the answer in 2D, I can not create a DW to insert the data directly.

So far, I create a WS proxy and I see that it connects correctly, but the response generates nested data, and I do not know how to access it. I get access to the data of the "header", which are in the 3 messagebox, but I do not know how to access lower levels ...

The WSDL I use is link

The object that the WS returns is of type resultadotabmodule , that inside has types tabcategorias , type tabinformes and at the end types tabinformesdatos , where are the data that I need to access.

And the code I have so far, in the Clicked event of a button in a window is this:

SoapConnection conn // Definimos conexión SOAP

webserviceexternalcontrollerservice proxy_obj // Declaramos proxy

long rVal

resultadotabmodule lo_res

tabinformes lt_informe

tabinformesdatos lt_datos


conn = create SoapConnection  //Creamos instancia de la conexión 

rVal = Conn.CreateInstance(proxy_obj, &
   "webserviceexternalcontrollerservice")

try
    // Create proxy object

 lo_res = proxy_obj.getreportscategory("98e03348f20cf62c735993d0fea96359", "Volcado_AMC_Carcer","2018-10-12",0,50000,"2018-10-12")


 messagebox("Respuesta", lo_res.Resultado)   
 messagebox("Id Categoria", lo_res.TabCategoria.IdCategoria)
 messagebox("Id Nube", lo_res.TabCategoria.IdNube)

catch ( SoapException e )
   messagebox ("Error", "WS no accesible")   

end try

destroy conn
    
asked by socderafel 29.10.2018 в 09:41
source

0 answers