cancel
Showing results for 
Search instead for 
Did you mean: 

Calling JavaScript API from Independant Application

spatils
Champ in-the-making
Champ in-the-making
Hello Experts,

Is it possible to call JavaScript API of alfresco from an Independant Application?
If yes how to import these scripts?
Is sample login code is available?

Regards
Sameer
9 REPLIES 9

mrogers
Star Contributor
Star Contributor
No you can't.   The Java and JavaScript APIs are local and not remote APIs.    

What we will typically do is to use a web script to run a piece of Java Script.

sonanaren
Champ in-the-making
Champ in-the-making
How can i call a web script from a PHP file.

My requirement.

We have alfresco 3.3 instance in a seperate machine and my PHP application in my local machine. In the PHP file how can i call the web script to perform the below operations.

1. Creating/Managing User Groups
2. Association of users to groups
3. Associating groups to spaces and permission for the same
4. Removing of users from spaces
5. Creating spaces

Please help me. Sample code implementation would be great. Thanks in advance.

invictus9
Champ in-the-making
Champ in-the-making
Web scripts are simply a web interface. They are not as full-featured as web services, but they can return pretty much anything you want, in the format you want.

So, you need to create a request via the web, in POST or GET form, to a web script, and it will return a result in some form.

Check out the wiki (wiki.alfresco.com) for Web Scripts. Look for how to get to the Web Script console. This allows you to list out the web scripts, including the interface, usage, and arguments. They are categorized along the lines that you suggest.

The URL for the Web Script console will look like: http://localhost:8080/alfresco/service/index – substitute your server as appropriate.

samsam
Champ in-the-making
Champ in-the-making
Hi,

Which API can be used to call alfresco search from a jsp/servlet?

mrogers
Star Contributor
Star Contributor
CMIS, WebServices, WebScripts, RMI

samsam
Champ in-the-making
Champ in-the-making
Can you specify which RMI to use?

samsam
Champ in-the-making
Champ in-the-making
Can RESTful or REST API be used for calling alfresco search from jsp/servlet? If not Restful API, can you specify the API thats is used for this purpose?

samsam
Champ in-the-making
Champ in-the-making
How do I execute CMIS queries from javascript? As I am new to alfresco I am facing some issues in this.

scouil
Star Contributor
Star Contributor
Are you new to alfresco or to web technologies in general?
As invictus9 pointed out, you can find a list of the webservices available here:
http://localhost:8080/alfresco/service/index – substitute your server as appropriate.
Find one that would suit your needs and look at the return format, it will be either json or xml or html or whatever format allowed by the webservice that you which to use.
You can easily call these urls from your php, either to POST some data or to GET some informations out of alfresco.