04-08-2020 08:59 AM
Hi,
I am able to pass 2 arguments to get webscript using below code:
<webscript>
<shortname>FileFolderService Test Sample Webscript</shortname>
<description>Uses the FileFolderService to create a folder and a file</description>
<url>/sample/filefolderservicetest?partname={partname}&type={type}</url>
<authentication>user</authentication>
<format default="html"></format>
<lifecycle>sample</lifecycle>
</webscript>
But I want to pass 29 to 30 parameters which i want to access in java conrtoller . so is there any way to pass n numbers of arguments efficiently.
04-09-2020 02:00 AM
You could pass these 30 parameters as a json object in the http body, instead of using url args.
You can then retrieve them in java controller this way:
new JSONObject(req.getContent().getContent())
04-08-2020 09:17 AM
04-08-2020 09:20 AM
Hi @EddieMay
If possible can you please share one dummy code snippet where I can get how to use args.
I have refered below url but still it requires name of all 30 arguments. Can' I pass list or array of arguments??
https://docs.alfresco.com/6.0/references/api-wsdl-args.html
Thanks
04-09-2020 02:00 AM
You could pass these 30 parameters as a json object in the http body, instead of using url args.
You can then retrieve them in java controller this way:
new JSONObject(req.getContent().getContent())
04-09-2020 03:20 AM
When you pass parameters as a JSON request body, you can use pre-parsed request objects instead of having to create a JSONObject yourself. The req.parseContent() will give you access to the request body - if in JSON, it will be JSONObject, if form-data, it will be the appropriate object for that.
Explore our Alfresco products with the links below. Use labels to filter content by product module.