问题
I'm trying to create a custom webscript on Alfresco Community. I'm following this tutorial: http://docs.alfresco.com/community/concepts/ws-folderListing-intro.html.
Everything works out fine in the beginning. When I navigate to
localhost:8080/alfresco/service/
and click on 'Refresh webscripts', my new webscript is registered.
But now when I navigate to
localhost:8080/alfresco/service/dir/Company%20Home
I get the following message:
The Web Script /alfresco/service/dir/Company Home has responded with a status of 404 - Not Found.
404 Description: Requested resource is not available.
Message: Folder Company Home not found.
Server: Community v4.2.0 (r63893-b12) schema 6.033
Time: 21-mei-2014 17:04:59
Diagnostics: Inspect Web Script (org/example/dir.get)
What is going wrong? I followed all the steps in the tutorial precisely.
回答1:
Check if you are using a different language then EN in your OS because Alfresco will translate all default folders's names depends in what language are used in your OS in my case am using French so there's no Company Home but there's Espace Racine.
About the listing folders API, there's no reason to do a web script for that because it's already exist by default in Alfresco under the path:
http://localhost:8080/alfresco/service/sample/folder/Company%20Home.
回答2:
Maybe you hit the bug: Need to know why 'companyhome' scope object not available in Workflow Script API
来源:https://stackoverflow.com/questions/23786473/alfresco-webscript-cant-find-company-home-folder