Hi Guys,
I am calling a webscript (action-execution) which requires me to pass a list of params in the body of the Post. When I try to pass an array of strings I get the below error. Also see code below.
Therefore, what is the correct way to pass an array of strings in the body of webscript call so that they are serialised into an array or List by the webscript.
Regards
Brian
Error: {"error":{"errorKey":"Could not read content from HTTP request body: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token\n at [Source: (BufferedReader); line: 1, column: 136] (through reference chain: java.lang.Object[0]->org.alfresco.rest.api.model.Action[\"params\"]->java.util.LinkedHashMap[\"email_list\"])","statusCode":400,"briefSummary":"05190018 Could not read content from HTTP request body: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token\n at [Source: (BufferedReader); line: 1, column: 136] (through reference chain: java.lang.Object[0]->org.alfresco.rest.api.model.Action[\"params\"]-
The calling code is as follows:
based on the error details, the server rejects your array. I suggest consulting the documentation to check if arrays are indeed supported there via REST api
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.