cancel
Showing results for 
Search instead for 
Did you mean: 

How can I call a data webscript from another data webscript?

tb13
Champ in-the-making
Champ in-the-making
Hi,
How would I go about calling a data webscript from another data webscript?

I would like to trigger something like this:
 
theUrl = "/slingshot/doclib/container/" + shortName + "/documentLibrary";
connector = remote.connect("alfresco");
result = connector.get(theUrl);

but since that seems to be webtier code it will not trigger …
I get the following error:
Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/sites.post.json.js': 10110139 ReferenceError: "remote" is not defined.

So what would I have to do to call the webscript at "/slingshot/doclib/container/" + shortName + "/documentLibrary from sites.post.json.js?

Tanks in advance …
1 REPLY 1

mikeh
Star Contributor
Star Contributor
Please see: http://drquyong.com/myblog/?p=49

Note however, the Java packages have probably changed since that blog post, as they now live in Spring Surf.

Thanks,
Mike