AnsweredAssumed Answered

How to connect Alfresco with GWT RPC

Question asked by jeanmonod on Nov 19, 2008
Latest reply on Jan 4, 2013 by jamesgustard
Hi all,

I'm develloping a web client using Google Web Toolkit. GWT has a great way to communicate with the server call GWT RPC. With this you can write your client-side code in java and in the server-side in a java-servlet, using the same java class in both side and transfering object form server to client, or from client to server, staying in pure java. You don't have to worry about json parsing or anything else. And you can share a common interface, that a great plus from a dev perspective.

My problem is that from my server side, I'm inside a servlet. And I don't know what is the best way to query my Alfresco repository from this servlet. I see some possibilities but I'm not sure which one to use or even which is the best. What I have imagine:

* Package my servlet inside the same war as Alfresco (using an AMP for exemple) and then query the repository with API Fundation. But I'm not sure if I'll be able to access the servlet as I should modifie the Alfresco web.xml (Is there a safe way to do that).

* Package my servlet in a new war, and query the repository with  API Fundation.

* Not using the API Fundation, but the Web Service API, but this seems not optimized as I know that I will stay on the same server.

* Extending the Webscript in order to return what GWT RPC is expecting. But this seems quite complicated…


So, my question is what would you do in such case?

Thanks if someone have an idee…

David

Outcomes