How to read return of a java function

Asked

Viewed 284 times

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. Follows the signature of the method:

Method:

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

Parameters:

  1. user: login of the user
  2. password: password of the user.
  3. companyId: company code.
  4. userid: registration of the user.
  5. processInstanceId: Request number.

Return: String[][].

To the call the method I have the following return:

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

I’m having trouble accessing the return data. I can only access one piece of information. Behold:

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 follows a picture of soapUI accessing the method.

inserir a descrição da imagem aqui

1 answer

1


Wild talk!

I believe the Ws you are using is from the TOTVS flow/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 resultAbstract variable serves to abstract the return of the data. This makes it easier to work with the same

  • True, I use the ECM. We haven’t yet migrated to Fluig.

  • I made an adjustment in the code, now it should be OK

  • What I’m doing is a custom dataset.

  • yes should work too

  • Failed> Occurred "[Lnet.java.dev.jaxb.array.Stringarray;" has no public instance field or method named "get".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.