How to read return from a java function

0

I use a third-party ged platform that provides web-services JAX-WS . There is a method called getInstanceCardData that returns the value of the form record fields of a request. Here's the method signature:

Method:

  

getInstanceCardData (String user, String password, int companyId,   String userId, int processInstanceId)

Parameters:

  • user: user login
  • password: the user's password.
  • companyId: company code.
  • userId: user registration.
  • processInstanceId: request number.
  •   

    Return: String [] [].

    call method I have the following return:

    net.java.dev.jaxb.array.StringArrayArray@3cece078
    

    I am not able to access the return data. I can only access information. See:

    result = getInstanceCardData(user, pass, company, userId, numeroProcesso);
    var item = getInstanceCardData.getItem();
    newDataset.addRow([
            item[i].item, // So consigo acessar essa informação.
            //item[i++].item
            //item[i++].item[i++]
            //item[i].item.item nem roda
           ]);
    

    Below is an image of soapUI accessing the method.

        
    asked by anonymous 16.08.2016 / 13:48

    1 answer

    1

    Talk the beast!

    I believe that the ws you are using is the TOTVS fluig / ECM. Here is an example of how to get the return, whether in form, process, or dataset events:

    var result = getInstanceCardData(user, pass, company, userId, numeroProcesso);
    var resultAbstract = []
    
    for (int i = 0; i < result.getItem().size(); i++)
        resultAbstract.push({i: result.getItem().get(i).getItem()})
    
    for(i in resultAbstract)
        log.info('Campo ' + i + ' valor ' + resultAbstract[i])
    

    The variable resultAbstract serves to abstract the return of the data. This makes it easier to work with them

        
    16.08.2016 / 15:25