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.
Solved! Go to Solution.
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())
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
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())
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
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.