cancel
Showing results for 
Search instead for 
Did you mean: 

How to Call classes and services of repository.jar

itsard
Champ in-the-making
Champ in-the-making
Hi,
Can anyone kindly let me know how do i directly call the services of repository.jar
Right now I am using alfresco-webservice-client.jar to access the DMs functionalities from my system.
I wish to avoid the webservice calls and access the services of repository.jar directly from my code.
This would be very helpful as the repository.jar offers a lot many classes which are not present in alfresco-webservice-client.jar.
I have my ear and the alfresco.war deployed in the same application server.
Please let me know what is the way to call the services or use the classes of repository.jar.
Thanks and Regards,
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
You can't directly call the local alfreso APIs from a remote application.    

The reccomended approach is to use web scripts.    If you are lucky there may already be one that does what you need.   Else you can drop one of your own into the repo.

itsard
Champ in-the-making
Champ in-the-making
Thanks for the reply.
Cant I use a jndi invokation to access the repository classes on a remote machine?

Another thing: can you guide me more on webscripts approach?
Thanks again

mrogers
Star Contributor
Star Contributor
I think you mean RMI rather than JNDI.    And yes you can but there's only 6 or so of the services exposed via RMI.    There's nothing to stop you dropping in your own RMI service though.

itsard
Champ in-the-making
Champ in-the-making
Whats the way to develop some services not provided by Alfresco? For eg. service to create a major version when user checks in is not present through alfresco-webservice-client.jar. If I wish to develop that functionality in Alfresco and expose it as a service to my application, can you guide me how to go about it? Whats the proper approach for more services and functionality development?
Thanks.

daniel_gradecak
Confirmed Champ
Confirmed Champ
Hi,

the best way to do it, IMHO, it is to use the Java API, however I guess that Alfresco would rather that you use public APIs like webscripts. We developed the Jibe framework which is following the principles that you seem to need. We use directly the Java API and we use it through one single webscript (our dispatcher). With that you can centralize your service calls, and call any java API, alfresco or 3rd party, directly from Javascript. We do have our own UI based on ExtJS.

have a look maybe it could help you.

http://jibeframework.org/

shamabbas
Champ in-the-making
Champ in-the-making
Hi all,
I want to know that I'm trying to use alfresco repository,content services to upload and  download the uploaded file. I did it using web scripts but it works within alfresco. If i want to integrate it with my own developed Java API??? and call these web scripts through java? or anyhow use these web scripts externally…? how can i?? i'm actually new so need little help please!?

thanks to all in advance to reply me!