Java: InfoTable addRow of ValueCollection puts empty
Hello,
I'm trying to pass an InfoTable as argument/parameter to a service at ThingWorx platform. All service calls work just fine but the InfoTable goes empty.
I'm populating the InfoTable this way (pseudo code):
InfoTable infoTable = new InfoTable();
ValueCollection definitions = new ValueCollection();
FOR (<# of properties>) {
definitions.put(Definition.name, new <T>Primitive(value-1));
...
definitions.put(Definition.name, new <T>Primitive(value-n));
log.debug(definitions.toJSON().toString());
infoTable.addRow(definitions.clone());
}
log.debug(" InfoTable: " + infoTable.toJSON().toString());
client.invokeService(...);
Now all this comes to output:
{..., "baseType":"<type>","description":"<desc>","name":"<name>", ... }
InfoTable: {"dataShape":{"fieldDefinitions":{}},"rows":[{},{},{},{}]}
Basically, an InfoTable object with empty value collections (the right amount of times, at least ).
What am I doing wrong or making a wrong assumption on how to populate an InfoTable?
Much appreciated for everyone that is able to contribute.
Cheers

