cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot able to call API Webscript in lastest version alfresco

kimryan
Champ in-the-making
Champ in-the-making
I create new page follow link : http://docs.alfresco.com/4.1/tasks/tutorial-share-add-page.html and add a file to call API in file js, but I am trying to run a webscript using the [var connector = remote.connect(”http”)]; but i cannot able to call the webscript it throws the following error: "ReferenceError: "remote" is not defined." as exception.

I added the "remote" entry to the scriptsObjects in the endpoint tag : 
<bean id="webscripts.container" class="org.alfresco.repo.web.scripts.TenantRepositoryContainer" parent="webscripts.abstractcontainer" init-method="setup">
    …
    <entry key="remote" value-ref="webscripts.script.remote" />
</bean>

there is some config webscript-framework-config.xml…bla bla. I think file doesn´t exist in this version

Have you any idea ???????????
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
Where did you place your js file ? "remote" object is server side object ,you can only call it in your webscript controller js not in client side js.
Welcome to the new Hyland Connect. Get started or submit feedback.