06-19-2019 01:48 AM
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:
10-08-2019 10:01 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.