I'm trying to pass a List of Strings to our custom DMI. I keep getting "cannot cast String to Collection" exceptions.
The DSRequest payload debug output shows something like:
Below are the relevant code snippets...
Code to set attribute:
Custom DMI:
ds.xml:
...not sure if multiple should be set for in the ds file.
I tried changing it to a string array then calling ValuesManager.setAttributeAsStringArray but I didn't have much luck there.
Thanks for your help in advance!
The DSRequest payload debug output shows something like:
Code:
... values:{ stringList:"[string A, string B, string 0, string 3, string 6]", } ...
Code to set attribute:
Code:
// otherList is an ArrayList<String> valuesManager.setValue("stringList", record.getAttribute("otherList"));
Code:
public DSResponse add(DSRequest dsRequest) throws Exception { Map<String,Object> map = dsRequest.getValues(); List<String> coiRecords = ((List<List<String>>) map.remove("stringList")).get(0); ...
Code:
<field multiple="true" name="stringList" type="text" />
I tried changing it to a string array then calling ValuesManager.setAttributeAsStringArray but I didn't have much luck there.
Thanks for your help in advance!
Comment