You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

*webscript wiki: http://wiki.alfresco.com/wiki/Web_Scripts*

Webscript has three part:

1. description document (name.method.desc.xml for example group.get.desc.xml

2. response template (name.method.format.ftl for example group.get.xml.ftl). It is in freemarker template (http://freemarker.org/docs/index.html)

3. execution script (name.method.js) http://wiki.alfresco.com/wiki/JavaScript_API

*Debug webscript:*1. set log4j.logger.org.alfresco.repo.jscript to DEBUG in log4j.properties

To see a list of webscripts:

http://localhost:8180/alfresco/service/index

To register a new webscript:

http://localhost:8180/alfresco/service/index and click on Refresh List of Webscript. No need to restart alfresco

To get details on a webscript:

http://localhost:8180/alfresco/service/script/[path to script]/name.method

For example: http://localhost:8180/alfresco/service/script/org/alfresco/repository/login.get\\

Where to deploy the webscript:

anywhere on classpath

build in webscripts are at:

tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts

To invoke a script with a ticket:

append "alf_ticket=xxxxx" at the end of the webscript url

  • No labels