cancel
Showing results for 
Search instead for 
Did you mean: 

how to use alfresco web services client

javid
Champ in-the-making
Champ in-the-making
hi im new to alfresco i would like to know how to make use of the alfresco web services client.can any1 tell me the procedure,the pack contains alfresco-web-services-client.jar and webservicesclient.properties where to place the files and how to deploy them how does it get reflected plz can any1 tel me step by step or plz provide the url related to this.waitin for reply asap
7 REPLIES 7

openpj
Elite Collaborator
Elite Collaborator
To use Alfresco Web Service Client, you need to follow this process:

1. Download alfresco-web-service-client.jar from the download page;
2. Add it to classpath of your application and in this way you can use it as a library;
3. You don't need to use webserviceclient.properties, you can also invoke this method to set Alfresco repository endpoint address:

WebServiceFactory.setEndpointAddress("http://localhost:8080/alfresco/api");
4. Here you can find more info about how to use Alfresco Web Service Client in Java.

Hope this helps.

bigbro
Champ in-the-making
Champ in-the-making
I don't know if this is correct or not but when I use "http://localhost:9090/alfresco/api" link the browser, it prompts me for the id and pw. After giving the correct credentials, I am getting some JSON code : {"list":{"pagination":{"count":1,"hasMoreItems":false,"totalItems":1,"skipCount":0,"maxItems":100},"entries":[{"entry":{"id":"-default-","quotas":[],"isEnabled":true}}]}}


Now, I have few things to confirm :
1) The output that I see in the browser is correct or not as given above.
2) When I use this end point URL in my 3rd party application, seems like I am not able to connect even after providing the correct credentials. The error I am getting is :
org.alfresco.webservice.util.WebServiceException: Error starting session.
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
3) I followed your steps but kind of unclear to me that after I download the Webservice jar file where should I deploy. However, I deploy at "C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib"; hope this is correct. Even after I deployed this, still no luck unless I deploy at the wrong place as I don't have any classpath setup.

I am using Alfresco Version: Community - v4.2.0 (r56674-b4848).

I don't know what is the issue here but your help is much appreciated.

Thank you.

ivaraf
Champ in-the-making
Champ in-the-making

Hello, 

Could you tell me how you connected?

peppelinux
Champ in-the-making
Champ in-the-making
I suggest to use the webserviceclient.properties , you can add this file in your project (if you use a framework like me).
Good luck

peppelinux
Champ in-the-making
Champ in-the-making
I have write this post to use the webservice client with eclipse
http://forums.alfresco.com/en/viewtopic.php?f=27&t=18505

opbarth
Champ in-the-making
Champ in-the-making
Am I right, that one can only authenticate a single user at one single alfresco with this lib,
since you have to use static functions like "AuthenticationUtils.startSession(strUserName, strPassword);" ?

What would be the right lib for remote java access: alfresco-remote-api? But where to start here?
Any suggestions would be great.

douglascrp
World-Class Innovator
World-Class Innovator

You are using something the I believe is no more supported.

What exactly do you want to do?

Maybe someone can give you other options.